Index: content/child/power_monitor_broadcast_source_unittest.cc |
diff --git a/content/child/power_monitor_broadcast_source_unittest.cc b/content/child/power_monitor_broadcast_source_unittest.cc |
index 5b472afdee2f724df3a3bd60ce0540bc4115a3cc..b665e90bbb05a4494e2782ec78f261e3c2edebad 100644 |
--- a/content/child/power_monitor_broadcast_source_unittest.cc |
+++ b/content/child/power_monitor_broadcast_source_unittest.cc |
@@ -14,19 +14,19 @@ |
protected: |
PowerMonitorBroadcastSourceTest() { |
power_monitor_source_ = new PowerMonitorBroadcastSource(); |
- base::PowerMonitor::Initialize( |
- scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)); |
+ power_monitor_.reset(new base::PowerMonitor( |
+ scoped_ptr<base::PowerMonitorSource>(power_monitor_source_))); |
} |
- virtual ~PowerMonitorBroadcastSourceTest() { |
- base::PowerMonitor::ShutdownForTesting(); |
- } |
+ virtual ~PowerMonitorBroadcastSourceTest() {} |
PowerMonitorBroadcastSource* source() { return power_monitor_source_; } |
+ base::PowerMonitor* monitor() { return power_monitor_.get(); } |
base::MessageLoop message_loop_; |
private: |
PowerMonitorBroadcastSource* power_monitor_source_; |
+ scoped_ptr<base::PowerMonitor> power_monitor_; |
DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSourceTest); |
}; |
@@ -36,7 +36,7 @@ |
source()->GetMessageFilter(); |
base::PowerMonitorTestObserver observer; |
- base::PowerMonitor::AddObserver(&observer); |
+ monitor()->AddObserver(&observer); |
PowerMonitorMsg_Suspend suspend_msg; |
PowerMonitorMsg_Resume resume_msg; |