| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 ProfileImplIOData::Handle::~Handle() { | 125 ProfileImplIOData::Handle::~Handle() { |
| 126 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 126 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 127 if (io_data_->predictor_ != NULL) { | 127 if (io_data_->predictor_ != NULL) { |
| 128 // io_data_->predictor_ might be NULL if Init() was never called | 128 // io_data_->predictor_ might be NULL if Init() was never called |
| 129 // (i.e. we shut down before ProfileImpl::DoFinalInit() got called). | 129 // (i.e. we shut down before ProfileImpl::DoFinalInit() got called). |
| 130 io_data_->predictor_->ShutdownOnUIThread(); | 130 io_data_->predictor_->ShutdownOnUIThread(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 if (io_data_->http_server_properties_manager_) | 133 if (io_data_->http_server_properties_manager_) |
| 134 io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); | 134 io_data_->http_server_properties_manager_->ShutdownOnPrefSequence(); |
| 135 | 135 |
| 136 // io_data_->data_reduction_proxy_io_data() might be NULL if Init() was | 136 // io_data_->data_reduction_proxy_io_data() might be NULL if Init() was |
| 137 // never called. | 137 // never called. |
| 138 if (io_data_->data_reduction_proxy_io_data()) | 138 if (io_data_->data_reduction_proxy_io_data()) |
| 139 io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread(); | 139 io_data_->data_reduction_proxy_io_data()->ShutdownOnUIThread(); |
| 140 | 140 |
| 141 io_data_->ShutdownOnUIThread(GetAllContextGetters()); | 141 io_data_->ShutdownOnUIThread(GetAllContextGetters()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void ProfileImplIOData::Handle::Init( | 144 void ProfileImplIOData::Handle::Init( |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); | 472 ApplyProfileParamsToContext(main_context); |
| 473 | 473 |
| 474 if (lazy_params_->http_server_properties_manager) { | 474 if (lazy_params_->http_server_properties_manager) { |
| 475 lazy_params_->http_server_properties_manager->InitializeOnNetworkThread(); | 475 lazy_params_->http_server_properties_manager->InitializeOnNetworkSequence(); |
| 476 main_context_storage->set_http_server_properties( | 476 main_context_storage->set_http_server_properties( |
| 477 std::move(lazy_params_->http_server_properties_manager)); | 477 std::move(lazy_params_->http_server_properties_manager)); |
| 478 } | 478 } |
| 479 | 479 |
| 480 main_context->set_transport_security_state(transport_security_state()); | 480 main_context->set_transport_security_state(transport_security_state()); |
| 481 main_context->set_ct_policy_enforcer( | 481 main_context->set_ct_policy_enforcer( |
| 482 io_thread_globals->ct_policy_enforcer.get()); | 482 io_thread_globals->ct_policy_enforcer.get()); |
| 483 | 483 |
| 484 main_context->set_net_log(io_thread->net_log()); | 484 main_context->set_net_log(io_thread->net_log()); |
| 485 | 485 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 const base::Closure& completion) { | 791 const base::Closure& completion) { |
| 792 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 792 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 793 DCHECK(initialized()); | 793 DCHECK(initialized()); |
| 794 | 794 |
| 795 DCHECK(transport_security_state()); | 795 DCHECK(transport_security_state()); |
| 796 // Completes synchronously. | 796 // Completes synchronously. |
| 797 transport_security_state()->DeleteAllDynamicDataSince(time); | 797 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 798 DCHECK(http_server_properties_manager_); | 798 DCHECK(http_server_properties_manager_); |
| 799 http_server_properties_manager_->Clear(completion); | 799 http_server_properties_manager_->Clear(completion); |
| 800 } | 800 } |
| OLD | NEW |