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/profile_impl_io_data.h" | 5 #include "chrome/browser/profiles/profile_impl_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 io_thread_globals->host_resolver.get()); | 283 io_thread_globals->host_resolver.get()); |
284 main_context->set_cert_verifier( | 284 main_context->set_cert_verifier( |
285 io_thread_globals->cert_verifier.get()); | 285 io_thread_globals->cert_verifier.get()); |
286 media_request_context_->set_cert_verifier( | 286 media_request_context_->set_cert_verifier( |
287 io_thread_globals->cert_verifier.get()); | 287 io_thread_globals->cert_verifier.get()); |
288 main_context->set_http_auth_handler_factory( | 288 main_context->set_http_auth_handler_factory( |
289 io_thread_globals->http_auth_handler_factory.get()); | 289 io_thread_globals->http_auth_handler_factory.get()); |
290 media_request_context_->set_http_auth_handler_factory( | 290 media_request_context_->set_http_auth_handler_factory( |
291 io_thread_globals->http_auth_handler_factory.get()); | 291 io_thread_globals->http_auth_handler_factory.get()); |
292 | 292 |
293 main_context->set_dns_cert_checker(dns_cert_checker()); | |
294 main_context->set_fraudulent_certificate_reporter( | 293 main_context->set_fraudulent_certificate_reporter( |
295 fraudulent_certificate_reporter()); | 294 fraudulent_certificate_reporter()); |
296 media_request_context_->set_dns_cert_checker(dns_cert_checker()); | |
297 media_request_context_->set_fraudulent_certificate_reporter( | 295 media_request_context_->set_fraudulent_certificate_reporter( |
298 fraudulent_certificate_reporter()); | 296 fraudulent_certificate_reporter()); |
299 | 297 |
300 main_context->set_proxy_service(proxy_service()); | 298 main_context->set_proxy_service(proxy_service()); |
301 media_request_context_->set_proxy_service(proxy_service()); | 299 media_request_context_->set_proxy_service(proxy_service()); |
302 | 300 |
303 scoped_refptr<net::CookieStore> cookie_store = NULL; | 301 scoped_refptr<net::CookieStore> cookie_store = NULL; |
304 net::OriginBoundCertService* origin_bound_cert_service = NULL; | 302 net::OriginBoundCertService* origin_bound_cert_service = NULL; |
305 if (record_mode || playback_mode) { | 303 if (record_mode || playback_mode) { |
306 // Don't use existing cookies and use an in-memory store. | 304 // Don't use existing cookies and use an in-memory store. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 new net::HttpCache::DefaultBackend( | 361 new net::HttpCache::DefaultBackend( |
364 net::DISK_CACHE, | 362 net::DISK_CACHE, |
365 lazy_params_->cache_path, | 363 lazy_params_->cache_path, |
366 lazy_params_->cache_max_size, | 364 lazy_params_->cache_max_size, |
367 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); | 365 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)); |
368 net::HttpCache* main_cache = new net::HttpCache( | 366 net::HttpCache* main_cache = new net::HttpCache( |
369 main_context->host_resolver(), | 367 main_context->host_resolver(), |
370 main_context->cert_verifier(), | 368 main_context->cert_verifier(), |
371 main_context->origin_bound_cert_service(), | 369 main_context->origin_bound_cert_service(), |
372 main_context->transport_security_state(), | 370 main_context->transport_security_state(), |
373 main_context->dns_cert_checker(), | |
374 main_context->proxy_service(), | 371 main_context->proxy_service(), |
375 "", // pass empty ssl_session_cache_shard to share the SSL session cache | 372 "", // pass empty ssl_session_cache_shard to share the SSL session cache |
376 // with everything that doesn't explicitly want a different one. | 373 // with everything that doesn't explicitly want a different one. |
377 main_context->ssl_config_service(), | 374 main_context->ssl_config_service(), |
378 main_context->http_auth_handler_factory(), | 375 main_context->http_auth_handler_factory(), |
379 main_context->network_delegate(), | 376 main_context->network_delegate(), |
380 main_context->http_server_properties(), | 377 main_context->http_server_properties(), |
381 main_context->net_log(), | 378 main_context->net_log(), |
382 main_backend); | 379 main_backend); |
383 | 380 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 scoped_refptr<ChromeURLRequestContext> | 489 scoped_refptr<ChromeURLRequestContext> |
493 ProfileImplIOData::AcquireIsolatedAppRequestContext( | 490 ProfileImplIOData::AcquireIsolatedAppRequestContext( |
494 scoped_refptr<ChromeURLRequestContext> main_context, | 491 scoped_refptr<ChromeURLRequestContext> main_context, |
495 const std::string& app_id) const { | 492 const std::string& app_id) const { |
496 // We create per-app contexts on demand, unlike the others above. | 493 // We create per-app contexts on demand, unlike the others above. |
497 scoped_refptr<ChromeURLRequestContext> app_request_context = | 494 scoped_refptr<ChromeURLRequestContext> app_request_context = |
498 InitializeAppRequestContext(main_context, app_id); | 495 InitializeAppRequestContext(main_context, app_id); |
499 DCHECK(app_request_context); | 496 DCHECK(app_request_context); |
500 return app_request_context; | 497 return app_request_context; |
501 } | 498 } |
OLD | NEW |