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

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: 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
« no previous file with comments | « base/timer/hi_res_timer_manager_win.cc ('k') | components/nacl/loader/nacl_helper_win_64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 faf51fb8370f00c29055cdeb8421467a74a3477b..807899d57b684648eab8fd47e00065f726ced6da 100644
--- a/chrome/browser/extensions/event_router_forwarder_unittest.cc
+++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -97,7 +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::ShutdownForTesting();
}
virtual void SetUp() {
@@ -114,7 +118,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_;
« no previous file with comments | « base/timer/hi_res_timer_manager_win.cc ('k') | components/nacl/loader/nacl_helper_win_64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698