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" |
52 #include "components/metrics/metrics_service.h" | 53 #include "components/metrics/metrics_service.h" |
53 #include "components/net_log/chrome_net_log.h" | 54 #include "components/net_log/chrome_net_log.h" |
54 #include "components/network_session_configurator/network_session_configurator.h
" | 55 #include "components/network_session_configurator/network_session_configurator.h
" |
55 #include "components/policy/core/common/policy_service.h" | 56 #include "components/policy/core/common/policy_service.h" |
56 #include "components/policy/policy_constants.h" | 57 #include "components/policy/policy_constants.h" |
57 #include "components/prefs/pref_registry_simple.h" | 58 #include "components/prefs/pref_registry_simple.h" |
58 #include "components/prefs/pref_service.h" | 59 #include "components/prefs/pref_service.h" |
59 #include "components/proxy_config/pref_proxy_config_tracker.h" | 60 #include "components/proxy_config/pref_proxy_config_tracker.h" |
60 #include "components/variations/variations_associated_data.h" | 61 #include "components/variations/variations_associated_data.h" |
61 #include "components/version_info/version_info.h" | 62 #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 */); | 522 true /* is_data_usage_off_the_record */); |
522 | 523 |
523 #if BUILDFLAG(ANDROID_JAVA_UI) | 524 #if BUILDFLAG(ANDROID_JAVA_UI) |
524 globals_->external_data_use_observer.reset( | 525 globals_->external_data_use_observer.reset( |
525 new chrome::android::ExternalDataUseObserver( | 526 new chrome::android::ExternalDataUseObserver( |
526 globals_->data_use_aggregator.get(), | 527 globals_->data_use_aggregator.get(), |
527 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 528 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
528 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); | 529 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI))); |
529 #endif | 530 #endif |
530 | 531 |
531 globals_->system_network_delegate = std::move(chrome_network_delegate); | 532 globals_->system_network_delegate = |
| 533 globals_->data_use_ascriber->CreateNetworkDelegate( |
| 534 std::move(chrome_network_delegate)); |
| 535 |
532 globals_->host_resolver = CreateGlobalHostResolver(net_log_); | 536 globals_->host_resolver = CreateGlobalHostResolver(net_log_); |
533 | 537 |
534 std::map<std::string, std::string> network_quality_estimator_params; | 538 std::map<std::string, std::string> network_quality_estimator_params; |
535 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, | 539 variations::GetVariationParams(kNetworkQualityEstimatorFieldTrialName, |
536 &network_quality_estimator_params); | 540 &network_quality_estimator_params); |
537 | 541 |
538 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; | 542 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; |
539 #if BUILDFLAG(ANDROID_JAVA_UI) | 543 #if BUILDFLAG(ANDROID_JAVA_UI) |
540 external_estimate_provider.reset( | 544 external_estimate_provider.reset( |
541 new chrome::android::ExternalEstimateProviderAndroid()); | 545 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 | 1078 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1075 // system URLRequestContext too. There's no reason this should be tied to a | 1079 // system URLRequestContext too. There's no reason this should be tied to a |
1076 // profile. | 1080 // profile. |
1077 return context; | 1081 return context; |
1078 } | 1082 } |
1079 | 1083 |
1080 const metrics::UpdateUsagePrefCallbackType& | 1084 const metrics::UpdateUsagePrefCallbackType& |
1081 IOThread::GetMetricsDataUseForwarder() { | 1085 IOThread::GetMetricsDataUseForwarder() { |
1082 return metrics_data_use_forwarder_; | 1086 return metrics_data_use_forwarder_; |
1083 } | 1087 } |
OLD | NEW |