| 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> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ptr_util.h" | 16 #include "base/memory/ptr_util.h" |
| 17 #include "base/metrics/field_trial.h" | 17 #include "base/metrics/field_trial.h" |
| 18 #include "base/sequenced_task_runner.h" | 18 #include "base/sequenced_task_runner.h" |
| 19 #include "base/stl_util.h" | 19 #include "base/stl_util.h" |
| 20 #include "base/strings/string_util.h" | 20 #include "base/strings/string_util.h" |
| 21 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
| 22 #include "base/threading/worker_pool.h" | 22 #include "base/threading/worker_pool.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
| 25 #include "chrome/browser/chrome_notification_types.h" | 25 #include "chrome/browser/chrome_notification_types.h" |
| 26 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 26 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 27 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 27 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 28 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber.h" |
| 28 #include "chrome/browser/io_thread.h" | 29 #include "chrome/browser/io_thread.h" |
| 29 #include "chrome/browser/net/chrome_network_delegate.h" | 30 #include "chrome/browser/net/chrome_network_delegate.h" |
| 30 #include "chrome/browser/net/http_server_properties_manager_factory.h" | 31 #include "chrome/browser/net/http_server_properties_manager_factory.h" |
| 31 #include "chrome/browser/net/predictor.h" | 32 #include "chrome/browser/net/predictor.h" |
| 32 #include "chrome/browser/net/quota_policy_channel_id_store.h" | 33 #include "chrome/browser/net/quota_policy_channel_id_store.h" |
| 33 #include "chrome/browser/net/sdch_owner_pref_storage.h" | 34 #include "chrome/browser/net/sdch_owner_pref_storage.h" |
| 34 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" | 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" |
| 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 37 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 37 #include "chrome/browser/previews/previews_service.h" | 38 #include "chrome/browser/previews/previews_service.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 if (http_server_properties_manager_) | 471 if (http_server_properties_manager_) |
| 471 http_server_properties_manager_->InitializeOnNetworkThread(); | 472 http_server_properties_manager_->InitializeOnNetworkThread(); |
| 472 | 473 |
| 473 main_context->set_transport_security_state(transport_security_state()); | 474 main_context->set_transport_security_state(transport_security_state()); |
| 474 main_context->set_ct_policy_enforcer( | 475 main_context->set_ct_policy_enforcer( |
| 475 io_thread_globals->ct_policy_enforcer.get()); | 476 io_thread_globals->ct_policy_enforcer.get()); |
| 476 | 477 |
| 477 main_context->set_net_log(io_thread->net_log()); | 478 main_context->set_net_log(io_thread->net_log()); |
| 478 | 479 |
| 479 network_delegate_ = data_reduction_proxy_io_data()->CreateNetworkDelegate( | 480 network_delegate_ = data_reduction_proxy_io_data()->CreateNetworkDelegate( |
| 480 std::move(chrome_network_delegate), true); | 481 io_thread_globals->data_use_ascriber->CreateNetworkDelegate( |
| 482 std::move(chrome_network_delegate)), |
| 483 true); |
| 481 | 484 |
| 482 main_context->set_network_delegate(network_delegate_.get()); | 485 main_context->set_network_delegate(network_delegate_.get()); |
| 483 | 486 |
| 484 main_context->set_http_server_properties(http_server_properties()); | 487 main_context->set_http_server_properties(http_server_properties()); |
| 485 | 488 |
| 486 main_context->set_host_resolver( | 489 main_context->set_host_resolver( |
| 487 io_thread_globals->host_resolver.get()); | 490 io_thread_globals->host_resolver.get()); |
| 488 | 491 |
| 489 main_context->set_http_auth_handler_factory( | 492 main_context->set_http_auth_handler_factory( |
| 490 io_thread_globals->http_auth_handler_factory.get()); | 493 io_thread_globals->http_auth_handler_factory.get()); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 const base::Closure& completion) { | 808 const base::Closure& completion) { |
| 806 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 809 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 807 DCHECK(initialized()); | 810 DCHECK(initialized()); |
| 808 | 811 |
| 809 DCHECK(transport_security_state()); | 812 DCHECK(transport_security_state()); |
| 810 // Completes synchronously. | 813 // Completes synchronously. |
| 811 transport_security_state()->DeleteAllDynamicDataSince(time); | 814 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 812 DCHECK(http_server_properties_manager_); | 815 DCHECK(http_server_properties_manager_); |
| 813 http_server_properties_manager_->Clear(completion); | 816 http_server_properties_manager_->Clear(completion); |
| 814 } | 817 } |
| OLD | NEW |