diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 03:53:13 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 03:53:13 +0000 |
commit | 32e9efbc0564ea718a7fb3b56d7ad934fefce70f (patch) | |
tree | 308e462dda8dc50008e9dfe26ae8b37c2705a2c7 /base/time.h | |
parent | 8f31f41edbe94651e1df889993be0704954942db (diff) | |
download | chromium_src-32e9efbc0564ea718a7fb3b56d7ad934fefce70f.zip chromium_src-32e9efbc0564ea718a7fb3b56d7ad934fefce70f.tar.gz chromium_src-32e9efbc0564ea718a7fb3b56d7ad934fefce70f.tar.bz2 |
Revert 63176 - Fix regression where high resolution timers could be activated even under
battery power. Add unit test to protect chromium from developers like me
in the future.
The fix is a one-liner in hi_res_timer_manager_win.cc. The rest of the code
change is the mechanics to enable the unit test.
BUG=59528
TEST=HiResTimerManagerTest.ToggleOnOff
Review URL: http://codereview.chromium.org/3848002
TBR=mbelshe@chromium.org
Review URL: http://codereview.chromium.org/3948001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time.h')
-rw-r--r-- | base/time.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/base/time.h b/base/time.h index 305ca6b..79e30b4 100644 --- a/base/time.h +++ b/base/time.h @@ -283,16 +283,10 @@ class Time { // Activates or deactivates the high resolution timer based on the |activate| // flag. If the HighResolutionTimer is not Enabled (see // EnableHighResolutionTimer), this function will return false. Otherwise - // returns true. Each successful activate call must be paired with a - // subsequent deactivate call. + // returns true. // All callers to activate the high resolution timer must eventually call // this function to deactivate the high resolution timer. static bool ActivateHighResolutionTimer(bool activate); - - // Returns true if the high resolution timer is both enabled and activated. - // This is provided for testing only, and is not tracked in a thread-safe - // way. - static bool IsHighResolutionTimerInUse(); #endif // Converts an exploded structure representing either the local time or UTC @@ -411,9 +405,6 @@ class Time { // when using battery power, we might elect to prevent high speed timers // which would draw more power. static bool high_resolution_timer_enabled_; - // Count of activations on the high resolution timer. Only use in tests - // which are single threaded. - static int high_resolution_timer_activated_; #endif // Time in microseconds in UTC. |