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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 46 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
47 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 47 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" |
48 #include "components/data_reduction_proxy/core/browser/data_store_impl.h" | 48 #include "components/data_reduction_proxy/core/browser/data_store_impl.h" |
49 #include "components/domain_reliability/monitor.h" | 49 #include "components/domain_reliability/monitor.h" |
50 #include "components/net_log/chrome_net_log.h" | 50 #include "components/net_log/chrome_net_log.h" |
51 #include "components/prefs/json_pref_store.h" | 51 #include "components/prefs/json_pref_store.h" |
52 #include "components/prefs/pref_filter.h" | 52 #include "components/prefs/pref_filter.h" |
53 #include "components/prefs/pref_member.h" | 53 #include "components/prefs/pref_member.h" |
54 #include "components/prefs/pref_service.h" | 54 #include "components/prefs/pref_service.h" |
55 #include "components/previews/core/previews_io_data.h" | 55 #include "components/previews/core/previews_io_data.h" |
56 #include "components/previews/core/previews_ui_service.h" | |
57 #include "content/public/browser/browser_thread.h" | 56 #include "content/public/browser/browser_thread.h" |
58 #include "content/public/browser/cookie_store_factory.h" | 57 #include "content/public/browser/cookie_store_factory.h" |
59 #include "content/public/browser/notification_service.h" | 58 #include "content/public/browser/notification_service.h" |
60 #include "content/public/browser/resource_context.h" | 59 #include "content/public/browser/resource_context.h" |
61 #include "content/public/browser/storage_partition.h" | 60 #include "content/public/browser/storage_partition.h" |
62 #include "extensions/browser/extension_protocols.h" | 61 #include "extensions/browser/extension_protocols.h" |
63 #include "extensions/common/constants.h" | 62 #include "extensions/common/constants.h" |
64 #include "net/base/cache_type.h" | 63 #include "net/base/cache_type.h" |
65 #include "net/base/sdch_manager.h" | 64 #include "net/base/sdch_manager.h" |
66 #include "net/cookies/cookie_store.h" | 65 #include "net/cookies/cookie_store.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_) | 202 DataReductionProxyChromeSettingsFactory::GetForBrowserContext(profile_) |
204 ->InitDataReductionProxySettings( | 203 ->InitDataReductionProxySettings( |
205 io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(), | 204 io_data_->data_reduction_proxy_io_data(), profile_->GetPrefs(), |
206 profile_->GetRequestContext(), std::move(store), | 205 profile_->GetRequestContext(), std::move(store), |
207 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 206 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
208 db_task_runner); | 207 db_task_runner); |
209 | 208 |
210 io_data_->previews_io_data_ = base::MakeUnique<previews::PreviewsIOData>( | 209 io_data_->previews_io_data_ = base::MakeUnique<previews::PreviewsIOData>( |
211 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), | 210 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), |
212 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 211 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
213 PreviewsServiceFactory::GetForProfile(profile_)->set_previews_ui_service( | 212 PreviewsServiceFactory::GetForProfile(profile_)->Initialize( |
214 base::MakeUnique<previews::PreviewsUIService>( | 213 io_data_->previews_io_data_.get(), |
215 io_data_->previews_io_data_.get(), | 214 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), profile_path); |
216 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nullptr)); | |
217 } | 215 } |
218 | 216 |
219 content::ResourceContext* | 217 content::ResourceContext* |
220 ProfileImplIOData::Handle::GetResourceContext() const { | 218 ProfileImplIOData::Handle::GetResourceContext() const { |
221 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 219 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
222 LazyInitialize(); | 220 LazyInitialize(); |
223 return GetResourceContextNoInit(); | 221 return GetResourceContextNoInit(); |
224 } | 222 } |
225 | 223 |
226 content::ResourceContext* | 224 content::ResourceContext* |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 const base::Closure& completion) { | 806 const base::Closure& completion) { |
809 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 807 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
810 DCHECK(initialized()); | 808 DCHECK(initialized()); |
811 | 809 |
812 DCHECK(transport_security_state()); | 810 DCHECK(transport_security_state()); |
813 // Completes synchronously. | 811 // Completes synchronously. |
814 transport_security_state()->DeleteAllDynamicDataSince(time); | 812 transport_security_state()->DeleteAllDynamicDataSince(time); |
815 DCHECK(http_server_properties_manager_); | 813 DCHECK(http_server_properties_manager_); |
816 http_server_properties_manager_->Clear(completion); | 814 http_server_properties_manager_->Clear(completion); |
817 } | 815 } |
OLD | NEW |