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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "components/network_session_configurator/network_session_configurator.h
" | 54 #include "components/network_session_configurator/network_session_configurator.h
" |
55 #include "components/policy/core/common/policy_service.h" | 55 #include "components/policy/core/common/policy_service.h" |
56 #include "components/policy/policy_constants.h" | 56 #include "components/policy/policy_constants.h" |
57 #include "components/prefs/pref_registry_simple.h" | 57 #include "components/prefs/pref_registry_simple.h" |
58 #include "components/prefs/pref_service.h" | 58 #include "components/prefs/pref_service.h" |
59 #include "components/proxy_config/pref_proxy_config_tracker.h" | 59 #include "components/proxy_config/pref_proxy_config_tracker.h" |
60 #include "components/variations/variations_associated_data.h" | 60 #include "components/variations/variations_associated_data.h" |
61 #include "components/version_info/version_info.h" | 61 #include "components/version_info/version_info.h" |
62 #include "content/public/browser/browser_thread.h" | 62 #include "content/public/browser/browser_thread.h" |
63 #include "content/public/browser/cookie_store_factory.h" | 63 #include "content/public/browser/cookie_store_factory.h" |
| 64 #include "content/public/browser/network_quality_observer_factory.h" |
64 #include "content/public/common/content_features.h" | 65 #include "content/public/common/content_features.h" |
65 #include "content/public/common/content_switches.h" | 66 #include "content/public/common/content_switches.h" |
66 #include "content/public/common/user_agent.h" | 67 #include "content/public/common/user_agent.h" |
67 #include "extensions/features/features.h" | 68 #include "extensions/features/features.h" |
68 #include "net/base/host_mapping_rules.h" | 69 #include "net/base/host_mapping_rules.h" |
69 #include "net/base/logging_network_change_observer.h" | 70 #include "net/base/logging_network_change_observer.h" |
70 #include "net/base/sdch_manager.h" | 71 #include "net/base/sdch_manager.h" |
71 #include "net/cert/caching_cert_verifier.h" | 72 #include "net/cert/caching_cert_verifier.h" |
72 #include "net/cert/cert_verifier.h" | 73 #include "net/cert/cert_verifier.h" |
73 #include "net/cert/cert_verify_proc.h" | 74 #include "net/cert/cert_verify_proc.h" |
74 #include "net/cert/ct_known_logs.h" | 75 #include "net/cert/ct_known_logs.h" |
75 #include "net/cert/ct_log_verifier.h" | 76 #include "net/cert/ct_log_verifier.h" |
76 #include "net/cert/ct_policy_enforcer.h" | 77 #include "net/cert/ct_policy_enforcer.h" |
77 #include "net/cert/ct_verifier.h" | 78 #include "net/cert/ct_verifier.h" |
78 #include "net/cert/multi_log_ct_verifier.h" | 79 #include "net/cert/multi_log_ct_verifier.h" |
79 #include "net/cert/multi_threaded_cert_verifier.h" | 80 #include "net/cert/multi_threaded_cert_verifier.h" |
80 #include "net/cert/sth_distributor.h" | 81 #include "net/cert/sth_distributor.h" |
81 #include "net/cert/sth_observer.h" | 82 #include "net/cert/sth_observer.h" |
82 #include "net/cookies/cookie_store.h" | 83 #include "net/cookies/cookie_store.h" |
83 #include "net/dns/host_cache.h" | 84 #include "net/dns/host_cache.h" |
84 #include "net/dns/host_resolver.h" | 85 #include "net/dns/host_resolver.h" |
85 #include "net/dns/mapped_host_resolver.h" | 86 #include "net/dns/mapped_host_resolver.h" |
86 #include "net/http/http_auth_filter.h" | 87 #include "net/http/http_auth_filter.h" |
87 #include "net/http/http_auth_handler_factory.h" | 88 #include "net/http/http_auth_handler_factory.h" |
88 #include "net/http/http_auth_preferences.h" | 89 #include "net/http/http_auth_preferences.h" |
89 #include "net/http/http_network_layer.h" | 90 #include "net/http/http_network_layer.h" |
90 #include "net/http/http_server_properties_impl.h" | 91 #include "net/http/http_server_properties_impl.h" |
91 #include "net/net_features.h" | 92 #include "net/net_features.h" |
92 #include "net/nqe/external_estimate_provider.h" | 93 #include "net/nqe/external_estimate_provider.h" |
93 #include "net/nqe/network_quality_estimator.h" | |
94 #include "net/nqe/network_quality_estimator_params.h" | 94 #include "net/nqe/network_quality_estimator_params.h" |
95 #include "net/proxy/proxy_config_service.h" | 95 #include "net/proxy/proxy_config_service.h" |
96 #include "net/proxy/proxy_script_fetcher_impl.h" | 96 #include "net/proxy/proxy_script_fetcher_impl.h" |
97 #include "net/proxy/proxy_service.h" | 97 #include "net/proxy/proxy_service.h" |
98 #include "net/quic/chromium/quic_utils_chromium.h" | 98 #include "net/quic/chromium/quic_utils_chromium.h" |
99 #include "net/socket/ssl_client_socket.h" | 99 #include "net/socket/ssl_client_socket.h" |
100 #include "net/socket/tcp_client_socket.h" | 100 #include "net/socket/tcp_client_socket.h" |
101 #include "net/ssl/channel_id_service.h" | 101 #include "net/ssl/channel_id_service.h" |
102 #include "net/ssl/default_channel_id_store.h" | 102 #include "net/ssl/default_channel_id_store.h" |
103 #include "net/url_request/data_protocol_handler.h" | 103 #include "net/url_request/data_protocol_handler.h" |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 | 576 |
577 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; | 577 std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider; |
578 #if defined(OS_ANDROID) | 578 #if defined(OS_ANDROID) |
579 external_estimate_provider.reset( | 579 external_estimate_provider.reset( |
580 new chrome::android::ExternalEstimateProviderAndroid()); | 580 new chrome::android::ExternalEstimateProviderAndroid()); |
581 #endif // defined(OS_ANDROID) | 581 #endif // defined(OS_ANDROID) |
582 // Pass ownership. | 582 // Pass ownership. |
583 globals_->network_quality_estimator.reset(new net::NetworkQualityEstimator( | 583 globals_->network_quality_estimator.reset(new net::NetworkQualityEstimator( |
584 std::move(external_estimate_provider), network_quality_estimator_params, | 584 std::move(external_estimate_provider), network_quality_estimator_params, |
585 net_log_)); | 585 net_log_)); |
| 586 globals_->network_quality_observer = content::CreateNetworkQualityObserver( |
| 587 globals_->network_quality_estimator.get()); |
586 | 588 |
587 UpdateDnsClientEnabled(); | 589 UpdateDnsClientEnabled(); |
588 #if defined(OS_CHROMEOS) | 590 #if defined(OS_CHROMEOS) |
589 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. | 591 // Creates a CertVerifyProc that doesn't allow any profile-provided certs. |
590 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>( | 592 globals_->cert_verifier = base::MakeUnique<net::CachingCertVerifier>( |
591 base::MakeUnique<net::MultiThreadedCertVerifier>( | 593 base::MakeUnique<net::MultiThreadedCertVerifier>( |
592 new chromeos::CertVerifyProcChromeOS())); | 594 new chromeos::CertVerifyProcChromeOS())); |
593 #else | 595 #else |
594 globals_->cert_verifier = net::CertVerifier::CreateDefault(); | 596 globals_->cert_verifier = net::CertVerifier::CreateDefault(); |
595 #endif | 597 #endif |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 | 1115 |
1114 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1116 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
1115 // system URLRequestContext too. There's no reason this should be tied to a | 1117 // system URLRequestContext too. There's no reason this should be tied to a |
1116 // profile. | 1118 // profile. |
1117 return context; | 1119 return context; |
1118 } | 1120 } |
1119 | 1121 |
1120 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { | 1122 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { |
1121 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); | 1123 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); |
1122 } | 1124 } |
OLD | NEW |