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

Side by Side Diff: ios/chrome/browser/browser_state/test_chrome_browser_state_isolated_context.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_isolated_co ntext.h" 5 #include "ios/chrome/browser/browser_state/test_chrome_browser_state_isolated_co ntext.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/syncable_prefs/pref_service_syncable.h" 8 #include "components/syncable_prefs/pref_service_syncable.h"
9 #include "ios/web/public/web_thread.h" 9 #include "ios/web/public/web_thread.h"
10 #include "net/url_request/url_request_test_util.h" 10 #include "net/url_request/url_request_test_util.h"
11 11
12 TestChromeBrowserStateWithIsolatedContext:: 12 TestChromeBrowserStateWithIsolatedContext::
13 TestChromeBrowserStateWithIsolatedContext() 13 TestChromeBrowserStateWithIsolatedContext()
14 : TestChromeBrowserState(base::FilePath(), 14 : TestChromeBrowserState(base::FilePath(),
15 scoped_ptr<syncable_prefs::PrefServiceSyncable>(), 15 scoped_ptr<syncable_prefs::PrefServiceSyncable>(),
16 TestingFactories(), 16 TestingFactories(),
17 RefcountedTestingFactories()), 17 RefcountedTestingFactories()),
18 main_context_called_(false), 18 main_context_called_(false) {}
19 request_context_(new net::TestURLRequestContextGetter(
20 web::WebThread::GetTaskRunnerForThread(web::WebThread::IO))) {}
21 19
22 TestChromeBrowserStateWithIsolatedContext:: 20 TestChromeBrowserStateWithIsolatedContext::
23 ~TestChromeBrowserStateWithIsolatedContext() {} 21 ~TestChromeBrowserStateWithIsolatedContext() {}
24 22
25 bool TestChromeBrowserStateWithIsolatedContext::MainContextCalled() const { 23 bool TestChromeBrowserStateWithIsolatedContext::MainContextCalled() const {
26 return main_context_called_; 24 return main_context_called_;
27 } 25 }
28 26
29 IOSWebViewFactoryExternalService 27 IOSWebViewFactoryExternalService
30 TestChromeBrowserStateWithIsolatedContext::SharingService() { 28 TestChromeBrowserStateWithIsolatedContext::SharingService() {
31 return SSO_AUTHENTICATION; 29 return SSO_AUTHENTICATION;
32 } 30 }
33 31
34 net::URLRequestContextGetter* 32 net::URLRequestContextGetter*
35 TestChromeBrowserStateWithIsolatedContext::GetRequestContext() { 33 TestChromeBrowserStateWithIsolatedContext::GetRequestContext() {
36 main_context_called_ = true; 34 main_context_called_ = true;
37 return TestChromeBrowserState::GetRequestContext(); 35 return TestChromeBrowserState::GetRequestContext();
38 } 36 }
39
40 net::URLRequestContextGetter*
41 TestChromeBrowserStateWithIsolatedContext::CreateIsolatedRequestContext(
42 const base::FilePath& partition_path) {
43 return request_context_.get();
44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698