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

Unified Diff: content/browser/power_monitor_message_broadcaster_unittest.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
Index: content/browser/power_monitor_message_broadcaster_unittest.cc
diff --git a/content/browser/power_monitor_message_broadcaster_unittest.cc b/content/browser/power_monitor_message_broadcaster_unittest.cc
index 996c4ec15c68032bfaf02bbc50c2fbd2ede01957..515508266cf812cf6ca10152d64f46a72fe4593f 100644
--- a/content/browser/power_monitor_message_broadcaster_unittest.cc
+++ b/content/browser/power_monitor_message_broadcaster_unittest.cc
@@ -50,17 +50,17 @@
protected:
PowerMonitorMessageBroadcasterTest() {
power_monitor_source_ = new base::PowerMonitorTestSource();
- base::PowerMonitor::Initialize(
- scoped_ptr<base::PowerMonitorSource>(power_monitor_source_));
+ power_monitor_.reset(new base::PowerMonitor(
+ scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)));
}
- virtual ~PowerMonitorMessageBroadcasterTest() {
- base::PowerMonitor::ShutdownForTesting();
- };
+ virtual ~PowerMonitorMessageBroadcasterTest() {};
base::PowerMonitorTestSource* source() { return power_monitor_source_; }
+ base::PowerMonitor* monitor() { return power_monitor_.get(); }
private:
base::PowerMonitorTestSource* power_monitor_source_;
+ scoped_ptr<base::PowerMonitor> power_monitor_;
DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcasterTest);
};
« no previous file with comments | « content/browser/power_monitor_message_broadcaster.cc ('k') | content/browser/renderer_host/media/media_stream_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698