Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1057)

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 2369673004: Wire NQE Prefs to Profile (Closed)
Patch Set: ps Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), 208 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
208 db_task_runner); 209 db_task_runner);
209 210
210 io_data_->set_previews_io_data(base::MakeUnique<previews::PreviewsIOData>( 211 io_data_->set_previews_io_data(base::MakeUnique<previews::PreviewsIOData>(
211 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), 212 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
212 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); 213 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)));
213 PreviewsServiceFactory::GetForProfile(profile_)->set_previews_ui_service( 214 PreviewsServiceFactory::GetForProfile(profile_)->set_previews_ui_service(
214 base::MakeUnique<previews::PreviewsUIService>( 215 base::MakeUnique<previews::PreviewsUIService>(
215 io_data_->previews_io_data(), 216 io_data_->previews_io_data(),
216 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nullptr)); 217 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), nullptr));
218 UINetworkQualityEstimatorServiceFactory::GetForProfile(profile_);
RyanSturm 2016/10/04 22:08:00 Comment about this initializes the Service
tbansal1 2016/10/11 20:49:26 Done.
217 } 219 }
218 220
219 content::ResourceContext* 221 content::ResourceContext*
220 ProfileImplIOData::Handle::GetResourceContext() const { 222 ProfileImplIOData::Handle::GetResourceContext() const {
221 DCHECK_CURRENTLY_ON(BrowserThread::UI); 223 DCHECK_CURRENTLY_ON(BrowserThread::UI);
222 LazyInitialize(); 224 LazyInitialize();
223 return GetResourceContextNoInit(); 225 return GetResourceContextNoInit();
224 } 226 }
225 227
226 content::ResourceContext* 228 content::ResourceContext*
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 const base::Closure& completion) { 809 const base::Closure& completion) {
808 DCHECK_CURRENTLY_ON(BrowserThread::IO); 810 DCHECK_CURRENTLY_ON(BrowserThread::IO);
809 DCHECK(initialized()); 811 DCHECK(initialized());
810 812
811 DCHECK(transport_security_state()); 813 DCHECK(transport_security_state());
812 // Completes synchronously. 814 // Completes synchronously.
813 transport_security_state()->DeleteAllDynamicDataSince(time); 815 transport_security_state()->DeleteAllDynamicDataSince(time);
814 DCHECK(http_server_properties_manager_); 816 DCHECK(http_server_properties_manager_);
815 http_server_properties_manager_->Clear(completion); 817 http_server_properties_manager_->Clear(completion);
816 } 818 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698