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

Unified Diff: base/timer/hi_res_timer_manager_win.cc

Issue 179923006: Attempting to resolve a race condition with PowerMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win64 fixes Created 6 years, 9 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 692f72b4e594481897bf022e256d51bb65b1f1b9..98b41d700926c76cf6849c21d3add8adc299b1e8 100644
--- a/base/timer/hi_res_timer_manager_win.cc
+++ b/base/timer/hi_res_timer_manager_win.cc
@@ -11,14 +11,12 @@ 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->IsOnBatteryPower());
+ base::PowerMonitor::AddObserver(this);
+ UseHiResClock(!base::PowerMonitor::IsOnBatteryPower());
}
HighResolutionTimerManager::~HighResolutionTimerManager() {
- base::PowerMonitor::Get()->RemoveObserver(this);
+ base::PowerMonitor::RemoveObserver(this);
UseHiResClock(false);
}
« 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