fix for high resolution timer on windows.

The CLs here
https://codereview.chromium.org/489793003
and here
https://codereview.chromium.org/395913006

In isolation look correct but taken together cause a overflow or underflow
bug. Basically the message loop was calling Time::ActivateHighResolutionTimer(false)
all the time (or very often) so the g_high_res_timer_count was underflowing
or overflowing.

Now messageloop only calls ActivateHighResolutionTimer in a balanced way.

This can make the base_unittests fail as well with
--gtest_filter=MessageLoopTest.HighResolutionTimer

BUG=153139
TEST=included, see bug for manual testing.

Review URL: https://codereview.chromium.org/541203002

Cr-Commit-Position: refs/heads/master@{#293434}


CrOS-Libchrome-Original-Commit: 3365a510b17169457292bdb6144cc8b95fb7ea34
2 files changed
tree: fc6c73c9fcf5dbd838952d0fbd8c1abc43d6a35b
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/