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

Unified Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/profiles/profile_manager_unittest.cc
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index 60c605ea10566e1f7bf8045bb962d5bf6839674d..cd8097ff51574bbcc9a21fea2ccf80356970722c 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -90,7 +90,7 @@ class ProfileManagerTest : public testing::Test {
};
ProfileManagerTest()
- : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)),
+ : local_state_(TestingBrowserProcess::GetGlobal()),
extension_event_router_forwarder_(new extensions::EventRouterForwarder),
ui_thread_(BrowserThread::UI, &message_loop_),
db_thread_(BrowserThread::DB, &message_loop_),
@@ -101,14 +101,14 @@ class ProfileManagerTest : public testing::Test {
base::SystemMonitor::AllocateSystemIOPorts();
#endif
system_monitor_dummy_.reset(new base::SystemMonitor);
- static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread(
+ TestingBrowserProcess::GetGlobal()->SetIOThread(
&io_thread_);
Jay Civelli 2013/01/04 01:17:35 Would that fit on the previous line?
Dan Beam 2013/01/04 01:26:50 Done.
}
virtual void SetUp() {
// Create a new temporary directory, and store the path
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
- static_cast<TestingBrowserProcess*>(g_browser_process)->SetProfileManager(
+ TestingBrowserProcess::GetGlobal()->SetProfileManager(
new testing::ProfileManager(temp_dir_.path()));
#if defined(OS_CHROMEOS)
@@ -118,7 +118,7 @@ class ProfileManagerTest : public testing::Test {
}
virtual void TearDown() {
- static_cast<TestingBrowserProcess*>(g_browser_process)->SetProfileManager(
+ TestingBrowserProcess::GetGlobal()->SetProfileManager(
NULL);
Jay Civelli 2013/01/04 01:17:35 Would that fit on the previous line?
Dan Beam 2013/01/04 01:26:50 Done.
message_loop_.RunUntilIdle();
}
@@ -227,7 +227,7 @@ TEST_F(ProfileManagerTest, CreateAndUseTwoProfiles) {
// Make sure any pending tasks run before we destroy the profiles.
message_loop_.RunUntilIdle();
- static_cast<TestingBrowserProcess*>(g_browser_process)->SetProfileManager(
+ TestingBrowserProcess::GetGlobal()->SetProfileManager(
NULL);
Jay Civelli 2013/01/04 01:17:35 Would that fit on the previous line?
Dan Beam 2013/01/04 01:26:50 Done.
// Make sure history cleans up correctly.

Powered by Google App Engine
This is Rietveld 408576698