OLD | NEW |
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/off_the_record_chrome_browser_state_i
mpl.h" | 5 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
mpl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 8 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
9 #include "components/proxy_config/pref_proxy_config_tracker.h" | 9 #include "components/proxy_config/pref_proxy_config_tracker.h" |
10 #include "components/syncable_prefs/pref_service_syncable.h" | 10 #include "components/sync_preferences/pref_service_syncable.h" |
11 #include "components/user_prefs/user_prefs.h" | 11 #include "components/user_prefs/user_prefs.h" |
12 #include "ios/chrome/browser/application_context.h" | 12 #include "ios/chrome/browser/application_context.h" |
13 #include "ios/chrome/browser/net/ios_chrome_url_request_context_getter.h" | 13 #include "ios/chrome/browser/net/ios_chrome_url_request_context_getter.h" |
14 #include "ios/chrome/browser/net/proxy_service_factory.h" | 14 #include "ios/chrome/browser/net/proxy_service_factory.h" |
15 #include "ios/web/public/web_thread.h" | 15 #include "ios/web/public/web_thread.h" |
16 | 16 |
17 OffTheRecordChromeBrowserStateImpl::OffTheRecordChromeBrowserStateImpl( | 17 OffTheRecordChromeBrowserStateImpl::OffTheRecordChromeBrowserStateImpl( |
18 ios::ChromeBrowserState* original_chrome_browser_state, | 18 ios::ChromeBrowserState* original_chrome_browser_state, |
19 const base::FilePath& otr_path) | 19 const base::FilePath& otr_path) |
20 : otr_state_path_(otr_path), | 20 : otr_state_path_(otr_path), |
21 original_chrome_browser_state_(original_chrome_browser_state), | 21 original_chrome_browser_state_(original_chrome_browser_state), |
22 prefs_(static_cast<syncable_prefs::PrefServiceSyncable*>( | 22 prefs_(static_cast<sync_preferences::PrefServiceSyncable*>( |
23 original_chrome_browser_state->GetOffTheRecordPrefs())) { | 23 original_chrome_browser_state->GetOffTheRecordPrefs())) { |
24 user_prefs::UserPrefs::Set(this, GetPrefs()); | 24 user_prefs::UserPrefs::Set(this, GetPrefs()); |
25 io_data_.reset(new OffTheRecordChromeBrowserStateIOData::Handle(this)); | 25 io_data_.reset(new OffTheRecordChromeBrowserStateIOData::Handle(this)); |
26 BrowserStateDependencyManager::GetInstance()->CreateBrowserStateServices( | 26 BrowserStateDependencyManager::GetInstance()->CreateBrowserStateServices( |
27 this); | 27 this); |
28 } | 28 } |
29 | 29 |
30 OffTheRecordChromeBrowserStateImpl::~OffTheRecordChromeBrowserStateImpl() { | 30 OffTheRecordChromeBrowserStateImpl::~OffTheRecordChromeBrowserStateImpl() { |
31 BrowserStateDependencyManager::GetInstance()->DestroyBrowserStateServices( | 31 BrowserStateDependencyManager::GetInstance()->DestroyBrowserStateServices( |
32 this); | 32 this); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, completion); | 111 web::WebThread::PostTask(web::WebThread::UI, FROM_HERE, completion); |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 net::URLRequestContextGetter* | 115 net::URLRequestContextGetter* |
116 OffTheRecordChromeBrowserStateImpl::CreateIsolatedRequestContext( | 116 OffTheRecordChromeBrowserStateImpl::CreateIsolatedRequestContext( |
117 const base::FilePath& partition_path) { | 117 const base::FilePath& partition_path) { |
118 NOTIMPLEMENTED(); | 118 NOTIMPLEMENTED(); |
119 return nullptr; | 119 return nullptr; |
120 } | 120 } |
OLD | NEW |