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

Unified Diff: content/browser/power_monitor_message_broadcaster_unittest.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
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 515508266cf812cf6ca10152d64f46a72fe4593f..996c4ec15c68032bfaf02bbc50c2fbd2ede01957 100644
--- a/content/browser/power_monitor_message_broadcaster_unittest.cc
+++ b/content/browser/power_monitor_message_broadcaster_unittest.cc
@@ -50,17 +50,17 @@ class PowerMonitorMessageBroadcasterTest : public testing::Test {
protected:
PowerMonitorMessageBroadcasterTest() {
power_monitor_source_ = new base::PowerMonitorTestSource();
- power_monitor_.reset(new base::PowerMonitor(
- scoped_ptr<base::PowerMonitorSource>(power_monitor_source_)));
+ base::PowerMonitor::Initialize(
+ scoped_ptr<base::PowerMonitorSource>(power_monitor_source_));
}
- virtual ~PowerMonitorMessageBroadcasterTest() {};
+ virtual ~PowerMonitorMessageBroadcasterTest() {
+ base::PowerMonitor::ShutdownForTesting();
+ };
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