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

Unified Diff: content/child/child_thread.cc

Issue 226263008: Revert of Attempting to resolve a race condition with PowerMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 95162f2d4ce80b16ef79cdb55e6451ece93513d9..d5fc4b4703895f653973b696bf04acfb38390d07 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -216,13 +216,13 @@
channel_->AddFilter(service_worker_message_filter_->GetFilter());
// In single process mode we may already have a power monitor
- if (!base::PowerMonitor::IsInitialized()) {
+ if (!base::PowerMonitor::Get()) {
scoped_ptr<PowerMonitorBroadcastSource> power_monitor_source(
- new PowerMonitorBroadcastSource());
+ new PowerMonitorBroadcastSource());
channel_->AddFilter(power_monitor_source->GetMessageFilter());
- base::PowerMonitor::Initialize(
- power_monitor_source.PassAs<base::PowerMonitorSource>());
+ power_monitor_.reset(new base::PowerMonitor(
+ 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