Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1103)

Unified Diff: base/timer/hi_res_timer_manager_win.cc

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows unit test errors Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/timer/hi_res_timer_manager_win.cc
diff --git a/base/timer/hi_res_timer_manager_win.cc b/base/timer/hi_res_timer_manager_win.cc
index 3647714c86964e5440b9687f44d8282383d53d0b..692f72b4e594481897bf022e256d51bb65b1f1b9 100644
--- a/base/timer/hi_res_timer_manager_win.cc
+++ b/base/timer/hi_res_timer_manager_win.cc
@@ -12,8 +12,9 @@ namespace base {
HighResolutionTimerManager::HighResolutionTimerManager()
: hi_res_clock_available_(false) {
base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
+ DCHECK(power_monitor != NULL);
power_monitor->AddObserver(this);
- UseHiResClock(!power_monitor->BatteryPower());
+ UseHiResClock(!power_monitor->IsOnBatteryPower());
}
HighResolutionTimerManager::~HighResolutionTimerManager() {
« no previous file with comments | « base/timer/hi_res_timer_manager_unittest.cc ('k') | chrome/browser/extensions/event_router_forwarder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698