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

Unified Diff: chrome/browser/extensions/event_router_forwarder_unittest.cc

Issue 179923006: Attempting to resolve a race condition with PowerMonitor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored to a more explicitly singleton-like style. Created 6 years, 10 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: chrome/browser/extensions/event_router_forwarder_unittest.cc
diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc
index 865d74b11551c6c9616c87b2f0efefc5fc5381b0..61b4b8b45dcf9868d7ba45d3edb424c7dcf75d80 100644
--- a/chrome/browser/extensions/event_router_forwarder_unittest.cc
+++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -97,9 +97,11 @@ class EventRouterForwarderTest : public testing::Test {
#endif
scoped_ptr<base::PowerMonitorSource> power_monitor_source(
new base::PowerMonitorDeviceSource());
- dummy.reset(new base::PowerMonitor(power_monitor_source.Pass()));
+ base::PowerMonitor::Initialize(power_monitor_source.Pass());
}
+ virtual ~EventRouterForwarderTest() { base::PowerMonitor::Shutdown(); }
+
virtual void SetUp() {
ASSERT_TRUE(profile_manager_.SetUp());
@@ -124,7 +126,6 @@ class EventRouterForwarderTest : public testing::Test {
content::TestBrowserThread ui_thread_;
content::TestBrowserThread io_thread_;
TestingProfileManager profile_manager_;
- scoped_ptr<base::PowerMonitor> dummy;
// Profiles are weak pointers, owned by ProfileManager in |browser_process_|.
TestingProfile* profile1_;
TestingProfile* profile2_;

Powered by Google App Engine
This is Rietveld 408576698