OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 7 #include <memory> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 ProfileParams* profile_params, | 462 ProfileParams* profile_params, |
463 content::ProtocolHandlerMap* protocol_handlers, | 463 content::ProtocolHandlerMap* protocol_handlers, |
464 content::URLRequestInterceptorScopedVector request_interceptors) const { | 464 content::URLRequestInterceptorScopedVector request_interceptors) const { |
465 net::URLRequestContext* main_context = main_request_context(); | 465 net::URLRequestContext* main_context = main_request_context(); |
466 net::URLRequestContextStorage* main_context_storage = | 466 net::URLRequestContextStorage* main_context_storage = |
467 main_request_context_storage(); | 467 main_request_context_storage(); |
468 | 468 |
469 IOThread* const io_thread = profile_params->io_thread; | 469 IOThread* const io_thread = profile_params->io_thread; |
470 IOThread::Globals* const io_thread_globals = io_thread->globals(); | 470 IOThread::Globals* const io_thread_globals = io_thread->globals(); |
471 | 471 |
472 ApplyProfileParamsToContext(main_context); | |
473 | |
474 if (lazy_params_->http_server_properties_manager) { | 472 if (lazy_params_->http_server_properties_manager) { |
475 lazy_params_->http_server_properties_manager->InitializeOnNetworkSequence(); | 473 lazy_params_->http_server_properties_manager->InitializeOnNetworkSequence(); |
476 main_context_storage->set_http_server_properties( | 474 main_context_storage->set_http_server_properties( |
477 std::move(lazy_params_->http_server_properties_manager)); | 475 std::move(lazy_params_->http_server_properties_manager)); |
478 } | 476 } |
479 | 477 |
480 main_context->set_transport_security_state(transport_security_state()); | |
481 main_context->set_ct_policy_enforcer( | |
482 io_thread_globals->system_request_context->ct_policy_enforcer()); | |
483 | |
484 main_context->set_net_log(io_thread->net_log()); | |
485 | |
486 main_context->set_http_auth_handler_factory( | |
487 io_thread_globals->system_request_context->http_auth_handler_factory()); | |
488 | |
489 main_context->set_proxy_service(proxy_service()); | |
490 main_context->set_network_quality_estimator( | 478 main_context->set_network_quality_estimator( |
491 io_thread_globals->network_quality_estimator.get()); | 479 io_thread_globals->network_quality_estimator.get()); |
492 | 480 |
493 // Create a single task runner to use with the CookieStore and ChannelIDStore. | 481 // Create a single task runner to use with the CookieStore and ChannelIDStore. |
494 scoped_refptr<base::SequencedTaskRunner> cookie_background_task_runner = | 482 scoped_refptr<base::SequencedTaskRunner> cookie_background_task_runner = |
495 base::CreateSequencedTaskRunnerWithTraits( | 483 base::CreateSequencedTaskRunnerWithTraits( |
496 {base::MayBlock(), base::TaskPriority::BACKGROUND, | 484 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
497 base::TaskShutdownBehavior::BLOCK_SHUTDOWN}); | 485 base::TaskShutdownBehavior::BLOCK_SHUTDOWN}); |
498 | 486 |
499 // Set up server bound cert service. | 487 // Set up server bound cert service. |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 return net::ReportingService::Create(net::ReportingPolicy(), | 779 return net::ReportingService::Create(net::ReportingPolicy(), |
792 url_request_context); | 780 url_request_context); |
793 } | 781 } |
794 | 782 |
795 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( | 783 void ProfileImplIOData::ClearNetworkingHistorySinceOnIOThread( |
796 base::Time time, | 784 base::Time time, |
797 const base::Closure& completion) { | 785 const base::Closure& completion) { |
798 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 786 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
799 DCHECK(initialized()); | 787 DCHECK(initialized()); |
800 | 788 |
801 DCHECK(transport_security_state()); | |
802 // Completes synchronously. | 789 // Completes synchronously. |
803 transport_security_state()->DeleteAllDynamicDataSince(time); | 790 main_request_context()->transport_security_state()->DeleteAllDynamicDataSince( |
| 791 time); |
804 DCHECK(http_server_properties_manager_); | 792 DCHECK(http_server_properties_manager_); |
805 http_server_properties_manager_->Clear(completion); | 793 http_server_properties_manager_->Clear(completion); |
806 } | 794 } |
OLD | NEW |