OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/profiles/off_the_record_profile_io_data.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 extensions_context->set_net_log(io_thread->net_log()); | 161 extensions_context->set_net_log(io_thread->net_log()); |
162 | 162 |
163 main_context->set_network_delegate(network_delegate()); | 163 main_context->set_network_delegate(network_delegate()); |
164 | 164 |
165 main_context->set_host_resolver( | 165 main_context->set_host_resolver( |
166 io_thread_globals->host_resolver.get()); | 166 io_thread_globals->host_resolver.get()); |
167 main_context->set_cert_verifier( | 167 main_context->set_cert_verifier( |
168 io_thread_globals->cert_verifier.get()); | 168 io_thread_globals->cert_verifier.get()); |
169 main_context->set_http_auth_handler_factory( | 169 main_context->set_http_auth_handler_factory( |
170 io_thread_globals->http_auth_handler_factory.get()); | 170 io_thread_globals->http_auth_handler_factory.get()); |
171 main_context->set_dns_cert_checker(dns_cert_checker()); | |
172 main_context->set_fraudulent_certificate_reporter( | 171 main_context->set_fraudulent_certificate_reporter( |
173 fraudulent_certificate_reporter()); | 172 fraudulent_certificate_reporter()); |
174 main_context->set_proxy_service(proxy_service()); | 173 main_context->set_proxy_service(proxy_service()); |
175 | 174 |
176 // For incognito, we use the default non-persistent HttpServerPropertiesImpl. | 175 // For incognito, we use the default non-persistent HttpServerPropertiesImpl. |
177 http_server_properties_.reset(new net::HttpServerPropertiesImpl); | 176 http_server_properties_.reset(new net::HttpServerPropertiesImpl); |
178 main_context->set_http_server_properties(http_server_properties_.get()); | 177 main_context->set_http_server_properties(http_server_properties_.get()); |
179 | 178 |
180 // For incognito, we use a non-persistent origin bound cert store. | 179 // For incognito, we use a non-persistent origin bound cert store. |
181 net::OriginBoundCertService* origin_bound_cert_service = | 180 net::OriginBoundCertService* origin_bound_cert_service = |
(...skipping 15 matching lines...) Expand all Loading... |
197 extensions_cookie_store->SetCookieableSchemes(schemes, 2); | 196 extensions_cookie_store->SetCookieableSchemes(schemes, 2); |
198 extensions_context->set_cookie_store(extensions_cookie_store); | 197 extensions_context->set_cookie_store(extensions_cookie_store); |
199 | 198 |
200 net::HttpCache::BackendFactory* main_backend = | 199 net::HttpCache::BackendFactory* main_backend = |
201 net::HttpCache::DefaultBackend::InMemory(0); | 200 net::HttpCache::DefaultBackend::InMemory(0); |
202 net::HttpCache* cache = | 201 net::HttpCache* cache = |
203 new net::HttpCache(main_context->host_resolver(), | 202 new net::HttpCache(main_context->host_resolver(), |
204 main_context->cert_verifier(), | 203 main_context->cert_verifier(), |
205 main_context->origin_bound_cert_service(), | 204 main_context->origin_bound_cert_service(), |
206 main_context->transport_security_state(), | 205 main_context->transport_security_state(), |
207 main_context->dns_cert_checker(), | |
208 main_context->proxy_service(), | 206 main_context->proxy_service(), |
209 kIncognitoSSLCacheShard, | 207 kIncognitoSSLCacheShard, |
210 main_context->ssl_config_service(), | 208 main_context->ssl_config_service(), |
211 main_context->http_auth_handler_factory(), | 209 main_context->http_auth_handler_factory(), |
212 main_context->network_delegate(), | 210 main_context->network_delegate(), |
213 main_context->http_server_properties(), | 211 main_context->http_server_properties(), |
214 main_context->net_log(), | 212 main_context->net_log(), |
215 main_backend); | 213 main_backend); |
216 | 214 |
217 main_http_factory_.reset(cache); | 215 main_http_factory_.reset(cache); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 scoped_refptr<ChromeURLRequestContext> | 260 scoped_refptr<ChromeURLRequestContext> |
263 OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( | 261 OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( |
264 scoped_refptr<ChromeURLRequestContext> main_context, | 262 scoped_refptr<ChromeURLRequestContext> main_context, |
265 const std::string& app_id) const { | 263 const std::string& app_id) const { |
266 // We create per-app contexts on demand, unlike the others above. | 264 // We create per-app contexts on demand, unlike the others above. |
267 scoped_refptr<ChromeURLRequestContext> app_request_context = | 265 scoped_refptr<ChromeURLRequestContext> app_request_context = |
268 InitializeAppRequestContext(main_context, app_id); | 266 InitializeAppRequestContext(main_context, app_id); |
269 DCHECK(app_request_context); | 267 DCHECK(app_request_context); |
270 return app_request_context; | 268 return app_request_context; |
271 } | 269 } |
OLD | NEW |