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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 #include "chrome/browser/net/sth_distributor_provider.h" | 42 #include "chrome/browser/net/sth_distributor_provider.h" |
43 #include "chrome/common/channel_info.h" | 43 #include "chrome/common/channel_info.h" |
44 #include "chrome/common/chrome_content_client.h" | 44 #include "chrome/common/chrome_content_client.h" |
45 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
46 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
47 #include "components/certificate_transparency/tree_state_tracker.h" | 47 #include "components/certificate_transparency/tree_state_tracker.h" |
48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" | 48 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" |
49 #include "components/data_usage/core/data_use_aggregator.h" | 49 #include "components/data_usage/core/data_use_aggregator.h" |
50 #include "components/data_usage/core/data_use_amortizer.h" | 50 #include "components/data_usage/core/data_use_amortizer.h" |
51 #include "components/data_usage/core/data_use_annotator.h" | 51 #include "components/data_usage/core/data_use_annotator.h" |
52 #include "components/data_use_measurement/core/data_use_ascriber.h" | |
mmenke
2016/09/22 14:36:45
Not needed, since you never derefernce one of thes
Not at Google. Contact bengr
2016/09/22 16:35:56
Done.
| |
53 #include "components/data_use_measurement/core/data_use_network_delegate.h" | |
52 #include "components/metrics/metrics_service.h" | 54 #include "components/metrics/metrics_service.h" |
53 #include "components/net_log/chrome_net_log.h" | 55 #include "components/net_log/chrome_net_log.h" |
54 #include "components/network_session_configurator/network_session_configurator.h " | 56 #include "components/network_session_configurator/network_session_configurator.h " |
55 #include "components/policy/core/common/policy_service.h" | 57 #include "components/policy/core/common/policy_service.h" |
56 #include "components/policy/policy_constants.h" | 58 #include "components/policy/policy_constants.h" |
57 #include "components/prefs/pref_registry_simple.h" | 59 #include "components/prefs/pref_registry_simple.h" |
58 #include "components/prefs/pref_service.h" | 60 #include "components/prefs/pref_service.h" |
59 #include "components/proxy_config/pref_proxy_config_tracker.h" | 61 #include "components/proxy_config/pref_proxy_config_tracker.h" |
60 #include "components/variations/variations_associated_data.h" | 62 #include "components/variations/variations_associated_data.h" |
61 #include "components/version_info/version_info.h" | 63 #include "components/version_info/version_info.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
521 true /* is_data_usage_off_the_record */); | 523 true /* is_data_usage_off_the_record */); |
522 | 524 |
523 #if BUILDFLAG(ANDROID_JAVA_UI) | 525 #if BUILDFLAG(ANDROID_JAVA_UI) |
524 globals_->external_data_use_observer.reset( | 526 globals_->external_data_use_observer.reset( |
525 new chrome::android::ExternalDataUseObserver( | 527 new chrome::android::ExternalDataUseObserver( |
526 globals_->data_use_aggregator.get(), | 528 globals_->data_use_aggregator.get(), |
527 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 529 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
528 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); | 530 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); |
529 #endif | 531 #endif |
530 | 532 |
531 globals_->system_network_delegate = std::move(chrome_network_delegate); | 533 globals_->system_network_delegate = |
534 base::MakeUnique<data_use_measurement::DataUseNetworkDelegate>( | |
535 std::move(chrome_network_delegate), | |
536 globals_->data_use_ascriber.get()); | |
mmenke
2016/09/22 14:36:45
optional: I'd suggest making this method:
global
Not at Google. Contact bengr
2016/09/22 16:35:56
Done. I like this suggestion since it makes the in
| |
537 | |
532 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 538 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
533 | 539 |
534 std::map<std::string, std::string> network_quality_estimator_params; | 540 std::map<std::string, std::string> network_quality_estimator_params; |
535 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, | 541 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, |
536 &network_quality_estimator_params); | 542 &network_quality_estimator_params); |
537 | 543 |
538 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; | 544 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; |
539 #if BUILDFLAG(ANDROID_JAVA_UI) | 545 #if BUILDFLAG(ANDROID_JAVA_UI) |
540 external_estimate_provider.reset( | 546 external_estimate_provider.reset( |
541 new chrome::android::ExternalEstimateProviderAndroid()); | 547 new chrome::android::ExternalEstimateProviderAndroid()); |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1074 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1080 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1075 // system URLRequestContext too. There's no reason this should be tied to a | 1081 // system URLRequestContext too. There's no reason this should be tied to a |
1076 // profile. | 1082 // profile. |
1077 return context; | 1083 return context; |
1078 } | 1084 } |
1079 | 1085 |
1080 const metrics::UpdateUsagePrefCallbackType& | 1086 const metrics::UpdateUsagePrefCallbackType& |
1081 IOThread::GetMetricsDataUseForwarder() { | 1087 IOThread::GetMetricsDataUseForwarder() { |
1082 return metrics_data_use_forwarder_; | 1088 return metrics_data_use_forwarder_; |
1083 } | 1089 } |
OLD | NEW |