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

Side by Side Diff: chrome/test/base/testing_browser_process.cc

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.h ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/test/base/testing_browser_process.h" 5 #include "chrome/test/base/testing_browser_process.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/time/default_clock.h" 8 #include "base/time/default_clock.h"
9 #include "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 policy::BrowserPolicyConnector* 146 policy::BrowserPolicyConnector*
147 TestingBrowserProcess::browser_policy_connector() { 147 TestingBrowserProcess::browser_policy_connector() {
148 if (!browser_policy_connector_) { 148 if (!browser_policy_connector_) {
149 EXPECT_FALSE(created_browser_policy_connector_); 149 EXPECT_FALSE(created_browser_policy_connector_);
150 created_browser_policy_connector_ = true; 150 created_browser_policy_connector_ = true;
151 browser_policy_connector_ = platform_part_->CreateBrowserPolicyConnector(); 151 browser_policy_connector_ = platform_part_->CreateBrowserPolicyConnector();
152 152
153 // Note: creating the ChromeBrowserPolicyConnector invokes BrowserThread:: 153 // Note: creating the ChromeBrowserPolicyConnector invokes BrowserThread::
154 // GetMessageLoopProxyForThread(), which initializes a base::LazyInstance of 154 // GetTaskRunnerForThread(), which initializes a base::LazyInstance of
155 // BrowserThreadTaskRunners. However, the threads that these task runners 155 // BrowserThreadTaskRunners. However, the threads that these task runners
156 // would run tasks on are *also* created lazily and might not exist yet. 156 // would run tasks on are *also* created lazily and might not exist yet.
157 // Creating them requires a MessageLoop, which a test can optionally create 157 // Creating them requires a MessageLoop, which a test can optionally create
158 // and manage itself, so don't do it here. 158 // and manage itself, so don't do it here.
159 } 159 }
160 return browser_policy_connector_.get(); 160 return browser_policy_connector_.get();
161 } 161 }
162 162
163 policy::PolicyService* TestingBrowserProcess::policy_service() { 163 policy::PolicyService* TestingBrowserProcess::policy_service() {
164 return browser_policy_connector()->GetPolicyService(); 164 return browser_policy_connector()->GetPolicyService();
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 /////////////////////////////////////////////////////////////////////////////// 449 ///////////////////////////////////////////////////////////////////////////////
450 450
451 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() { 451 TestingBrowserProcessInitializer::TestingBrowserProcessInitializer() {
452 TestingBrowserProcess::CreateInstance(); 452 TestingBrowserProcess::CreateInstance();
453 } 453 }
454 454
455 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() { 455 TestingBrowserProcessInitializer::~TestingBrowserProcessInitializer() {
456 TestingBrowserProcess::DeleteInstance(); 456 TestingBrowserProcess::DeleteInstance();
457 } 457 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.h ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698