OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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
o_data.h" | 5 #include "ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_i
o_data.h" |
6 | 6 |
7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 cookie_util::CookieStoreConfig::COOKIE_STORE_IOS, nullptr)); | 201 cookie_util::CookieStoreConfig::COOKIE_STORE_IOS, nullptr)); |
202 main_context->set_cookie_store(main_cookie_store_.get()); | 202 main_context->set_cookie_store(main_cookie_store_.get()); |
203 main_cookie_store_->SetChannelIDServiceID(channel_id_service->GetUniqueID()); | 203 main_cookie_store_->SetChannelIDServiceID(channel_id_service->GetUniqueID()); |
204 | 204 |
205 http_network_session_ = CreateHttpNetworkSession(*profile_params); | 205 http_network_session_ = CreateHttpNetworkSession(*profile_params); |
206 main_http_factory_ = CreateMainHttpFactory( | 206 main_http_factory_ = CreateMainHttpFactory( |
207 http_network_session_.get(), net::HttpCache::DefaultBackend::InMemory(0)); | 207 http_network_session_.get(), net::HttpCache::DefaultBackend::InMemory(0)); |
208 | 208 |
209 main_context->set_http_transaction_factory(main_http_factory_.get()); | 209 main_context->set_http_transaction_factory(main_http_factory_.get()); |
210 | 210 |
211 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory( | 211 std::unique_ptr<net::URLRequestJobFactoryImpl> main_job_factory = |
212 new net::URLRequestJobFactoryImpl()); | 212 net::URLRequestJobFactoryImpl::CreateWithDefaultProtocolHandlers(); |
213 | 213 |
214 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); | 214 InstallProtocolHandlers(main_job_factory.get(), protocol_handlers); |
215 URLRequestInterceptorScopedVector empty_interceptors; | 215 URLRequestInterceptorScopedVector empty_interceptors; |
216 main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory), | 216 main_job_factory_ = SetUpJobFactoryDefaults(std::move(main_job_factory), |
217 std::move(empty_interceptors), | 217 std::move(empty_interceptors), |
218 main_context->network_delegate()); | 218 main_context->network_delegate()); |
219 main_context->set_job_factory(main_job_factory_.get()); | 219 main_context->set_job_factory(main_job_factory_.get()); |
220 | 220 |
221 // Setup SDCH for this profile. | 221 // Setup SDCH for this profile. |
222 sdch_manager_.reset(new net::SdchManager); | 222 sdch_manager_.reset(new net::SdchManager); |
223 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); | 223 sdch_policy_.reset(new net::SdchOwner(sdch_manager_.get(), main_context)); |
224 main_context->set_sdch_manager(sdch_manager_.get()); | 224 main_context->set_sdch_manager(sdch_manager_.get()); |
225 } | 225 } |
226 | 226 |
227 ChromeBrowserStateIOData::AppRequestContext* | 227 ChromeBrowserStateIOData::AppRequestContext* |
228 OffTheRecordChromeBrowserStateIOData::InitializeAppRequestContext( | 228 OffTheRecordChromeBrowserStateIOData::InitializeAppRequestContext( |
229 net::URLRequestContext* main_context) const { | 229 net::URLRequestContext* main_context) const { |
230 NOTREACHED(); | 230 NOTREACHED(); |
231 return nullptr; | 231 return nullptr; |
232 } | 232 } |
233 | 233 |
234 ChromeBrowserStateIOData::AppRequestContext* | 234 ChromeBrowserStateIOData::AppRequestContext* |
235 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext( | 235 OffTheRecordChromeBrowserStateIOData::AcquireIsolatedAppRequestContext( |
236 net::URLRequestContext* main_context) const { | 236 net::URLRequestContext* main_context) const { |
237 NOTREACHED(); | 237 NOTREACHED(); |
238 return nullptr; | 238 return nullptr; |
239 } | 239 } |
OLD | NEW |