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

Unified Diff: content/child/child_thread.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
« no previous file with comments | « content/child/child_thread.h ('k') | content/child/power_monitor_broadcast_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index d5fc4b4703895f653973b696bf04acfb38390d07..95162f2d4ce80b16ef79cdb55e6451ece93513d9 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -216,13 +216,13 @@ void ChildThread::Init() {
channel_->AddFilter(service_worker_message_filter_->GetFilter());
// In single process mode we may already have a power monitor
- if (!base::PowerMonitor::Get()) {
+ if (!base::PowerMonitor::IsInitialized()) {
scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source(
- new PowerMonitorBroadcastSource());
+ new PowerMonitorBroadcastSource());
channel_->AddFilter(power_monitor_source->GetMessageFilter());
- power_monitor_.reset(new base::PowerMonitor(
- power_monitor_source.PassAs<base::PowerMonitorSource>()));
+ base::PowerMonitor::Initialize(
+ power_monitor_source.PassAs<base::PowerMonitorSource>());
}
#if defined(OS_POSIX)
« no previous file with comments | « content/child/child_thread.h ('k') | content/child/power_monitor_broadcast_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698