summaryrefslogtreecommitdiffstats
path: root/app/hi_res_timer_manager.h
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 10:50:38 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 10:50:38 +0000
commit21766d7536424c43a8d677bedeb8c81e6cce41c7 (patch)
treee9da0d1983b21f2459ba8fdc56699a252b4bda38 /app/hi_res_timer_manager.h
parente97c2822866796a872cb59c12a5e831e98b085d3 (diff)
downloadchromium_src-21766d7536424c43a8d677bedeb8c81e6cce41c7.zip
chromium_src-21766d7536424c43a8d677bedeb8c81e6cce41c7.tar.gz
chromium_src-21766d7536424c43a8d677bedeb8c81e6cce41c7.tar.bz2
Revert 63191 - 2nd try:
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 Broke unit_tests on Vista and XP: [ RUN ] GeolocationNetworkProviderTest.GatewayAndWifiScans [2916:2376:1020/030222:2975321329:FATAL:network_location_provider.cc(51)] Check failed: cache_.size() == cache_times_.size(). Review URL: http://codereview.chromium.org/3889004 TBR=mbelshe@chromium.org Review URL: http://codereview.chromium.org/3946003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/hi_res_timer_manager.h')
-rw-r--r--app/hi_res_timer_manager.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/hi_res_timer_manager.h b/app/hi_res_timer_manager.h
index fdc10b3..7eed795 100644
--- a/app/hi_res_timer_manager.h
+++ b/app/hi_res_timer_manager.h
@@ -18,14 +18,11 @@ class HighResolutionTimerManager : public SystemMonitor::PowerObserver {
// SystemMonitor::PowerObserver:
void OnPowerStateChange(bool on_battery_power);
- // Returns true if the hi resolution clock could be used right now.
- bool hi_res_clock_available() const { return hi_res_clock_available_; }
-
private:
// Enable or disable the faster multimedia timer.
void UseHiResClock(bool use);
- bool hi_res_clock_available_;
+ bool hi_res_clock_used_;
DISALLOW_COPY_AND_ASSIGN(HighResolutionTimerManager);
};