| 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 11 matching lines...) Expand all Loading... |
| 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/data_use_measurement/chrome_data_use_ascriber.h" |
| 29 #include "chrome/browser/io_thread.h" | 29 #include "chrome/browser/io_thread.h" |
| 30 #include "chrome/browser/net/chrome_network_delegate.h" | 30 #include "chrome/browser/net/chrome_network_delegate.h" |
| 31 #include "chrome/browser/net/http_server_properties_manager_factory.h" | 31 #include "chrome/browser/net/http_server_properties_manager_factory.h" |
| 32 #include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h" |
| 32 #include "chrome/browser/net/predictor.h" | 33 #include "chrome/browser/net/predictor.h" |
| 33 #include "chrome/browser/net/quota_policy_channel_id_store.h" | 34 #include "chrome/browser/net/quota_policy_channel_id_store.h" |
| 34 #include "chrome/browser/net/sdch_owner_pref_storage.h" | 35 #include "chrome/browser/net/sdch_owner_pref_storage.h" |
| 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" | 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h" |
| 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 37 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
| 37 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 38 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
| 38 #include "chrome/browser/previews/previews_service.h" | 39 #include "chrome/browser/previews/previews_service.h" |
| 39 #include "chrome/browser/previews/previews_service_factory.h" | 40 #include "chrome/browser/previews/previews_service_factory.h" |
| 40 #include "chrome/browser/profiles/profile.h" | 41 #include "chrome/browser/profiles/profile.h" |
| 41 #include "chrome/common/chrome_constants.h" | 42 #include "chrome/common/chrome_constants.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 profile_->GetRequestContext(), std::move(store), | 206 profile_->GetRequestContext(), std::move(store), |
| 206 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 207 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| 207 db_task_runner); | 208 db_task_runner); |
| 208 | 209 |
| 209 io_data_->previews_io_data_ = base::MakeUnique<previews::PreviewsIOData>( | 210 io_data_->previews_io_data_ = base::MakeUnique<previews::PreviewsIOData>( |
| 210 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 211 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
| 211 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 212 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 212 PreviewsServiceFactory::GetForProfile(profile_)->Initialize( | 213 PreviewsServiceFactory::GetForProfile(profile_)->Initialize( |
| 213 io_data_->previews_io_data_.get(), | 214 io_data_->previews_io_data_.get(), |
| 214 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), profile_path); | 215 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), profile_path); |
| 216 |
| 217 // Initialize the UI network quality estimator service so it can |
| 218 // read/write the prefs. |
| 219 UINetworkQualityEstimatorServiceFactory::GetForProfile(profile_); |
| 215 } | 220 } |
| 216 | 221 |
| 217 content::ResourceContext* | 222 content::ResourceContext* |
| 218 ProfileImplIOData::Handle::GetResourceContext() const { | 223 ProfileImplIOData::Handle::GetResourceContext() const { |
| 219 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 224 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 220 LazyInitialize(); | 225 LazyInitialize(); |
| 221 return GetResourceContextNoInit(); | 226 return GetResourceContextNoInit(); |
| 222 } | 227 } |
| 223 | 228 |
| 224 content::ResourceContext* | 229 content::ResourceContext* |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 const base::Closure& completion) { | 811 const base::Closure& completion) { |
| 807 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 812 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 808 DCHECK(initialized()); | 813 DCHECK(initialized()); |
| 809 | 814 |
| 810 DCHECK(transport_security_state()); | 815 DCHECK(transport_security_state()); |
| 811 // Completes synchronously. | 816 // Completes synchronously. |
| 812 transport_security_state()->DeleteAllDynamicDataSince(time); | 817 transport_security_state()->DeleteAllDynamicDataSince(time); |
| 813 DCHECK(http_server_properties_manager_); | 818 DCHECK(http_server_properties_manager_); |
| 814 http_server_properties_manager_->Clear(completion); | 819 http_server_properties_manager_->Clear(completion); |
| 815 } | 820 } |
| OLD | NEW |