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

Side by Side Diff: ios/chrome/browser/browser_state/test_chrome_browser_state.mm

Issue 1742293003: Remove isolated app code from iOS's chrome_browser_state_io_data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ios/chrome/browser/browser_state/test_chrome_browser_state.h" 5 #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 completion.Run(); 276 completion.Run();
277 } 277 }
278 278
279 net::URLRequestContextGetter* TestChromeBrowserState::CreateRequestContext( 279 net::URLRequestContextGetter* TestChromeBrowserState::CreateRequestContext(
280 ProtocolHandlerMap* protocol_handlers, 280 ProtocolHandlerMap* protocol_handlers,
281 URLRequestInterceptorScopedVector request_interceptors) { 281 URLRequestInterceptorScopedVector request_interceptors) {
282 return new net::TestURLRequestContextGetter( 282 return new net::TestURLRequestContextGetter(
283 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO)); 283 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO));
284 } 284 }
285 285
286 net::URLRequestContextGetter*
287 TestChromeBrowserState::CreateIsolatedRequestContext(
288 const base::FilePath& partition_path) {
289 return nullptr;
290 }
291
292 TestChromeBrowserState* TestChromeBrowserState::AsTestChromeBrowserState() { 286 TestChromeBrowserState* TestChromeBrowserState::AsTestChromeBrowserState() {
293 return this; 287 return this;
294 } 288 }
295 289
296 void TestChromeBrowserState::CreateWebDataService() { 290 void TestChromeBrowserState::CreateWebDataService() {
297 ignore_result( 291 ignore_result(
298 ios::WebDataServiceFactory::GetInstance()->SetTestingFactoryAndUse( 292 ios::WebDataServiceFactory::GetInstance()->SetTestingFactoryAndUse(
299 this, &BuildWebDataService)); 293 this, &BuildWebDataService));
300 294
301 // Wait a bit after creating the WebDataService to allow the initialisation 295 // Wait a bit after creating the WebDataService to allow the initialisation
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 DCHECK(!build_called_); 411 DCHECK(!build_called_);
418 pref_service_ = std::move(prefs); 412 pref_service_ = std::move(prefs);
419 } 413 }
420 414
421 scoped_ptr<TestChromeBrowserState> TestChromeBrowserState::Builder::Build() { 415 scoped_ptr<TestChromeBrowserState> TestChromeBrowserState::Builder::Build() {
422 DCHECK(!build_called_); 416 DCHECK(!build_called_);
423 return make_scoped_ptr(new TestChromeBrowserState( 417 return make_scoped_ptr(new TestChromeBrowserState(
424 state_path_, std::move(pref_service_), testing_factories_, 418 state_path_, std::move(pref_service_), testing_factories_,
425 refcounted_testing_factories_)); 419 refcounted_testing_factories_));
426 } 420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698