| Index: content/child/child_thread.cc
|
| diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
|
| index e38e3a5856e224eee4febc43777728d909a92000..d5b758e8e3ff6616983170710b7e3c7f79222f85 100644
|
| --- a/content/child/child_thread.cc
|
| +++ b/content/child/child_thread.cc
|
| @@ -259,13 +259,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)
|
| @@ -308,6 +308,8 @@ ChildThread::~ChildThread() {
|
| channel_->RemoveFilter(histogram_message_filter_.get());
|
| channel_->RemoveFilter(sync_message_filter_.get());
|
|
|
| + base::PowerMonitor::Shutdown();
|
| +
|
| // The ChannelProxy object caches a pointer to the IPC thread, so need to
|
| // reset it as it's not guaranteed to outlive this object.
|
| // NOTE: this also has the side-effect of not closing the main IPC channel to
|
|
|