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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 #include "net/spdy/spdy_session.h" | 80 #include "net/spdy/spdy_session.h" |
81 #include "net/ssl/channel_id_service.h" | 81 #include "net/ssl/channel_id_service.h" |
82 #include "net/ssl/default_channel_id_store.h" | 82 #include "net/ssl/default_channel_id_store.h" |
83 #include "net/url_request/data_protocol_handler.h" | 83 #include "net/url_request/data_protocol_handler.h" |
84 #include "net/url_request/file_protocol_handler.h" | 84 #include "net/url_request/file_protocol_handler.h" |
85 #include "net/url_request/ftp_protocol_handler.h" | 85 #include "net/url_request/ftp_protocol_handler.h" |
86 #include "net/url_request/static_http_user_agent_settings.h" | 86 #include "net/url_request/static_http_user_agent_settings.h" |
87 #include "net/url_request/url_fetcher.h" | 87 #include "net/url_request/url_fetcher.h" |
88 #include "net/url_request/url_request_backoff_manager.h" | 88 #include "net/url_request/url_request_backoff_manager.h" |
89 #include "net/url_request/url_request_context.h" | 89 #include "net/url_request/url_request_context.h" |
90 #include "net/url_request/url_request_context_builder.h" | |
90 #include "net/url_request/url_request_context_getter.h" | 91 #include "net/url_request/url_request_context_getter.h" |
91 #include "net/url_request/url_request_job_factory_impl.h" | 92 #include "net/url_request/url_request_job_factory_impl.h" |
92 #include "url/url_constants.h" | 93 #include "url/url_constants.h" |
93 | 94 |
94 #if defined(ENABLE_CONFIGURATION_POLICY) | 95 #if defined(ENABLE_CONFIGURATION_POLICY) |
95 #include "policy/policy_constants.h" | 96 #include "policy/policy_constants.h" |
96 #endif | 97 #endif |
97 | 98 |
98 #if defined(ENABLE_EXTENSIONS) | 99 #if defined(ENABLE_EXTENSIONS) |
99 #include "chrome/browser/extensions/event_router_forwarder.h" | 100 #include "chrome/browser/extensions/event_router_forwarder.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
221 ConstructProxyScriptFetcherContext(IOThread::Globals* globals, | 222 ConstructProxyScriptFetcherContext(IOThread::Globals* globals, |
222 net::NetLog* net_log) { | 223 net::NetLog* net_log) { |
223 net::URLRequestContext* context = new net::URLRequestContext; | 224 net::URLRequestContext* context = new net::URLRequestContext; |
224 context->set_net_log(net_log); | 225 context->set_net_log(net_log); |
225 context->set_host_resolver(globals->host_resolver.get()); | 226 context->set_host_resolver(globals->host_resolver.get()); |
226 context->set_cert_verifier(globals->cert_verifier.get()); | 227 context->set_cert_verifier(globals->cert_verifier.get()); |
227 context->set_transport_security_state( | 228 context->set_transport_security_state( |
228 globals->transport_security_state.get()); | 229 globals->transport_security_state.get()); |
229 context->set_cert_transparency_verifier( | 230 context->set_cert_transparency_verifier( |
230 globals->cert_transparency_verifier.get()); | 231 globals->cert_transparency_verifier.get()); |
232 context->set_ssl_config_service(globals->ssl_config_service.get()); | |
231 context->set_http_auth_handler_factory( | 233 context->set_http_auth_handler_factory( |
232 globals->http_auth_handler_factory.get()); | 234 globals->http_auth_handler_factory.get()); |
233 context->set_proxy_service(globals->proxy_script_fetcher_proxy_service.get()); | 235 context->set_proxy_service(globals->proxy_script_fetcher_proxy_service.get()); |
234 context->set_http_transaction_factory( | |
235 globals->proxy_script_fetcher_http_transaction_factory.get()); | |
236 context->set_job_factory( | 236 context->set_job_factory( |
237 globals->proxy_script_fetcher_url_request_job_factory.get()); | 237 globals->proxy_script_fetcher_url_request_job_factory.get()); |
238 context->set_cookie_store(globals->system_cookie_store.get()); | 238 context->set_cookie_store(globals->system_cookie_store.get()); |
239 context->set_channel_id_service( | 239 context->set_channel_id_service( |
240 globals->system_channel_id_service.get()); | 240 globals->system_channel_id_service.get()); |
241 context->set_network_delegate(globals->system_network_delegate.get()); | 241 context->set_network_delegate(globals->system_network_delegate.get()); |
242 context->set_http_user_agent_settings( | 242 context->set_http_user_agent_settings( |
243 globals->http_user_agent_settings.get()); | 243 globals->http_user_agent_settings.get()); |
244 context->set_http_server_properties( | |
245 globals->http_server_properties->GetWeakPtr()); | |
244 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 246 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
245 // system URLRequestContext too. There's no reason this should be tied to a | 247 // system URLRequestContext too. There's no reason this should be tied to a |
246 // profile. | 248 // profile. |
247 return context; | 249 return context; |
248 } | 250 } |
249 | 251 |
250 net::URLRequestContext* | 252 net::URLRequestContext* |
251 ConstructSystemRequestContext(IOThread::Globals* globals, | 253 ConstructSystemRequestContext(IOThread::Globals* globals, |
252 net::NetLog* net_log) { | 254 net::NetLog* net_log) { |
253 net::URLRequestContext* context = new SystemURLRequestContext; | 255 net::URLRequestContext* context = new SystemURLRequestContext; |
254 context->set_net_log(net_log); | 256 context->set_net_log(net_log); |
255 context->set_host_resolver(globals->host_resolver.get()); | 257 context->set_host_resolver(globals->host_resolver.get()); |
256 context->set_cert_verifier(globals->cert_verifier.get()); | 258 context->set_cert_verifier(globals->cert_verifier.get()); |
257 context->set_transport_security_state( | 259 context->set_transport_security_state( |
258 globals->transport_security_state.get()); | 260 globals->transport_security_state.get()); |
259 context->set_cert_transparency_verifier( | 261 context->set_cert_transparency_verifier( |
260 globals->cert_transparency_verifier.get()); | 262 globals->cert_transparency_verifier.get()); |
263 context->set_ssl_config_service(globals->ssl_config_service.get()); | |
261 context->set_http_auth_handler_factory( | 264 context->set_http_auth_handler_factory( |
262 globals->http_auth_handler_factory.get()); | 265 globals->http_auth_handler_factory.get()); |
263 context->set_proxy_service(globals->system_proxy_service.get()); | 266 context->set_proxy_service(globals->system_proxy_service.get()); |
264 context->set_http_transaction_factory( | |
265 globals->system_http_transaction_factory.get()); | |
266 context->set_job_factory(globals->system_url_request_job_factory.get()); | 267 context->set_job_factory(globals->system_url_request_job_factory.get()); |
267 context->set_cookie_store(globals->system_cookie_store.get()); | 268 context->set_cookie_store(globals->system_cookie_store.get()); |
268 context->set_channel_id_service( | 269 context->set_channel_id_service( |
269 globals->system_channel_id_service.get()); | 270 globals->system_channel_id_service.get()); |
270 context->set_network_delegate(globals->system_network_delegate.get()); | 271 context->set_network_delegate(globals->system_network_delegate.get()); |
271 context->set_http_user_agent_settings( | 272 context->set_http_user_agent_settings( |
272 globals->http_user_agent_settings.get()); | 273 globals->http_user_agent_settings.get()); |
274 context->set_http_server_properties( | |
275 globals->http_server_properties->GetWeakPtr()); | |
273 context->set_network_quality_estimator( | 276 context->set_network_quality_estimator( |
274 globals->network_quality_estimator.get()); | 277 globals->network_quality_estimator.get()); |
275 context->set_backoff_manager(globals->url_request_backoff_manager.get()); | 278 context->set_backoff_manager(globals->url_request_backoff_manager.get()); |
276 return context; | 279 return context; |
277 } | 280 } |
278 | 281 |
279 int GetSwitchValueAsInt(const base::CommandLine& command_line, | 282 int GetSwitchValueAsInt(const base::CommandLine& command_line, |
280 const std::string& switch_name) { | 283 const std::string& switch_name) { |
281 int value; | 284 int value; |
282 if (!base::StringToInt(command_line.GetSwitchValueASCII(switch_name), | 285 if (!base::StringToInt(command_line.GetSwitchValueASCII(switch_name), |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
809 switches::kEnableUserAlternateProtocolPorts)) { | 812 switches::kEnableUserAlternateProtocolPorts)) { |
810 globals_->enable_user_alternate_protocol_ports = true; | 813 globals_->enable_user_alternate_protocol_ports = true; |
811 } | 814 } |
812 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 815 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
813 // is fixed. | 816 // is fixed. |
814 tracked_objects::ScopedTracker tracking_profile13( | 817 tracked_objects::ScopedTracker tracking_profile13( |
815 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 818 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
816 "466432 IOThread::InitAsync::InitializeNetworkOptions")); | 819 "466432 IOThread::InitAsync::InitializeNetworkOptions")); |
817 InitializeNetworkOptions(command_line); | 820 InitializeNetworkOptions(command_line); |
818 | 821 |
819 net::HttpNetworkSession::Params session_params; | |
820 InitializeNetworkSessionParams(&session_params); | |
821 session_params.net_log = net_log_; | |
822 session_params.proxy_service = | |
823 globals_->proxy_script_fetcher_proxy_service.get(); | |
824 | |
825 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | |
826 // is fixed. | |
827 tracked_objects::ScopedTracker tracking_profile14( | |
828 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
829 "466432 IOThread::InitAsync::HttpNetorkSession::Start")); | |
830 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession"); | |
831 scoped_refptr<net::HttpNetworkSession> network_session( | |
832 new net::HttpNetworkSession(session_params)); | |
833 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | |
834 // is fixed. | |
835 tracked_objects::ScopedTracker tracking_profile15( | |
836 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
837 "466432 IOThread::InitAsync::HttpNetorkSession::End")); | |
838 globals_->proxy_script_fetcher_http_transaction_factory | |
839 .reset(new net::HttpNetworkLayer(network_session.get())); | |
840 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); | |
841 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( | 822 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( |
842 new net::URLRequestJobFactoryImpl()); | 823 new net::URLRequestJobFactoryImpl()); |
843 | 824 |
844 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | 825 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 |
845 // is fixed. | 826 // is fixed. |
846 tracked_objects::ScopedTracker tracking_profile16( | 827 tracked_objects::ScopedTracker tracking_profile16( |
847 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 828 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
848 "466432 IOThread::InitAsync::SetProtocolHandler")); | 829 "466432 IOThread::InitAsync::SetProtocolHandler")); |
849 job_factory->SetProtocolHandler(url::kDataScheme, | 830 job_factory->SetProtocolHandler(url::kDataScheme, |
850 new net::DataProtocolHandler()); | 831 new net::DataProtocolHandler()); |
851 job_factory->SetProtocolHandler( | 832 job_factory->SetProtocolHandler( |
852 url::kFileScheme, | 833 url::kFileScheme, |
853 new net::FileProtocolHandler( | 834 new net::FileProtocolHandler( |
854 content::BrowserThread::GetBlockingPool()-> | 835 content::BrowserThread::GetBlockingPool()-> |
855 GetTaskRunnerWithShutdownBehavior( | 836 GetTaskRunnerWithShutdownBehavior( |
856 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); | 837 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); |
857 #if !defined(DISABLE_FTP_SUPPORT) | 838 #if !defined(DISABLE_FTP_SUPPORT) |
858 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( | 839 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( |
859 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 840 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
860 job_factory->SetProtocolHandler( | 841 job_factory->SetProtocolHandler( |
861 url::kFtpScheme, | 842 url::kFtpScheme, |
862 new net::FtpProtocolHandler( | 843 new net::FtpProtocolHandler( |
863 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); | 844 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); |
864 #endif | 845 #endif |
865 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); | 846 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); |
866 | 847 |
867 globals_->proxy_script_fetcher_context.reset( | 848 globals_->proxy_script_fetcher_context.reset( |
868 ConstructProxyScriptFetcherContext(globals_, net_log_)); | 849 ConstructProxyScriptFetcherContext(globals_, net_log_)); |
869 | 850 |
851 net::HttpNetworkSession::Params session_params; | |
852 InitializeNetworkSessionParams(&session_params); | |
853 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( | |
854 &session_params, globals_->proxy_script_fetcher_context.get()); | |
855 | |
856 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | |
857 // is fixed. | |
858 tracked_objects::ScopedTracker tracking_profile14( | |
859 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
860 "466432 IOThread::InitAsync::HttpNetorkSession::Start")); | |
861 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession"); | |
862 scoped_refptr<net::HttpNetworkSession> network_session( | |
863 new net::HttpNetworkSession(session_params)); | |
864 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432 | |
865 // is fixed. | |
866 tracked_objects::ScopedTracker tracking_profile15( | |
867 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
868 "466432 IOThread::InitAsync::HttpNetorkSession::End")); | |
869 globals_->proxy_script_fetcher_http_transaction_factory | |
870 .reset(new net::HttpNetworkLayer(network_session.get())); | |
871 globals_->proxy_script_fetcher_context->set_http_transaction_factory( | |
872 globals_->proxy_script_fetcher_http_transaction_factory.get()); | |
873 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); | |
874 | |
870 const version_info::Channel channel = chrome::GetChannel(); | 875 const version_info::Channel channel = chrome::GetChannel(); |
871 if (channel == version_info::Channel::UNKNOWN || | 876 if (channel == version_info::Channel::UNKNOWN || |
872 channel == version_info::Channel::CANARY || | 877 channel == version_info::Channel::CANARY || |
873 channel == version_info::Channel::DEV) { | 878 channel == version_info::Channel::DEV) { |
874 globals_->url_request_backoff_manager.reset( | 879 globals_->url_request_backoff_manager.reset( |
875 new net::URLRequestBackoffManager()); | 880 new net::URLRequestBackoffManager()); |
876 } | 881 } |
877 | 882 |
878 #if defined(OS_MACOSX) && !defined(OS_IOS) | 883 #if defined(OS_MACOSX) && !defined(OS_IOS) |
879 // Start observing Keychain events. This needs to be done on the UI thread, | 884 // Start observing Keychain events. This needs to be done on the UI thread, |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1092 } | 1097 } |
1093 | 1098 |
1094 void IOThread::InitializeNetworkSessionParams( | 1099 void IOThread::InitializeNetworkSessionParams( |
1095 net::HttpNetworkSession::Params* params) { | 1100 net::HttpNetworkSession::Params* params) { |
1096 InitializeNetworkSessionParamsFromGlobals(*globals_, params); | 1101 InitializeNetworkSessionParamsFromGlobals(*globals_, params); |
1097 } | 1102 } |
1098 | 1103 |
1099 // static | 1104 // static |
1100 void IOThread::InitializeNetworkSessionParamsFromGlobals( | 1105 void IOThread::InitializeNetworkSessionParamsFromGlobals( |
1101 const IOThread::Globals& globals, | 1106 const IOThread::Globals& globals, |
1102 net::HttpNetworkSession::Params* params) { | 1107 net::HttpNetworkSession::Params* params) { |
mmenke
2015/08/13 15:37:38
Not for this CL, but may make sense to separate ar
| |
1103 params->host_resolver = globals.host_resolver.get(); | 1108 // TODO(wjmaclean): The next two properties of the params don't seem to be |
1104 params->cert_verifier = globals.cert_verifier.get(); | 1109 // elements of URLRequestContext, so they must be set here. |
1105 params->cert_policy_enforcer = globals.cert_policy_enforcer.get(); | 1110 // Is it OK that they are shared? |
1106 params->channel_id_service = globals.system_channel_id_service.get(); | 1111 params->cert_policy_enforcer = globals.cert_policy_enforcer.get(); // WJM |
mmenke
2015/08/13 15:37:38
I have no idea what this does - should probably ta
wjmaclean
2015/08/14 13:29:19
I've looped in davidben@ to comment on this.
| |
1107 params->transport_security_state = globals.transport_security_state.get(); | 1112 params->host_mapping_rules = globals.host_mapping_rules.get(); // WJM |
mmenke
2015/08/13 15:37:38
host_mapping_rules is for command line options (Mo
wjmaclean
2015/08/14 13:29:19
Acknowledged.
| |
1108 params->ssl_config_service = globals.ssl_config_service.get(); | 1113 |
1109 params->http_auth_handler_factory = globals.http_auth_handler_factory.get(); | |
1110 params->http_server_properties = | |
1111 globals.http_server_properties->GetWeakPtr(); | |
1112 params->network_delegate = globals.system_network_delegate.get(); | |
1113 params->host_mapping_rules = globals.host_mapping_rules.get(); | |
1114 params->ignore_certificate_errors = globals.ignore_certificate_errors; | 1114 params->ignore_certificate_errors = globals.ignore_certificate_errors; |
1115 params->testing_fixed_http_port = globals.testing_fixed_http_port; | 1115 params->testing_fixed_http_port = globals.testing_fixed_http_port; |
1116 params->testing_fixed_https_port = globals.testing_fixed_https_port; | 1116 params->testing_fixed_https_port = globals.testing_fixed_https_port; |
1117 globals.enable_tcp_fast_open_for_ssl.CopyToIfSet( | 1117 globals.enable_tcp_fast_open_for_ssl.CopyToIfSet( |
1118 ¶ms->enable_tcp_fast_open_for_ssl); | 1118 ¶ms->enable_tcp_fast_open_for_ssl); |
1119 | 1119 |
1120 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( | 1120 globals.initial_max_spdy_concurrent_streams.CopyToIfSet( |
1121 ¶ms->spdy_initial_max_concurrent_streams); | 1121 ¶ms->spdy_initial_max_concurrent_streams); |
1122 globals.enable_spdy_compression.CopyToIfSet( | 1122 globals.enable_spdy_compression.CopyToIfSet( |
1123 ¶ms->enable_spdy_compression); | 1123 ¶ms->enable_spdy_compression); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1214 *base::CommandLine::ForCurrentProcess(); | 1214 *base::CommandLine::ForCurrentProcess(); |
1215 globals_->system_proxy_service.reset( | 1215 globals_->system_proxy_service.reset( |
1216 ProxyServiceFactory::CreateProxyService( | 1216 ProxyServiceFactory::CreateProxyService( |
1217 net_log_, | 1217 net_log_, |
1218 globals_->proxy_script_fetcher_context.get(), | 1218 globals_->proxy_script_fetcher_context.get(), |
1219 globals_->system_network_delegate.get(), | 1219 globals_->system_network_delegate.get(), |
1220 system_proxy_config_service_.release(), | 1220 system_proxy_config_service_.release(), |
1221 command_line, | 1221 command_line, |
1222 quick_check_enabled_.GetValue())); | 1222 quick_check_enabled_.GetValue())); |
1223 | 1223 |
1224 globals_->system_url_request_job_factory.reset( | |
1225 new net::URLRequestJobFactoryImpl()); | |
1226 globals_->system_request_context.reset( | |
1227 ConstructSystemRequestContext(globals_, net_log_)); | |
mmenke
2015/08/13 15:37:38
Everything below this line may make more sense in
wjmaclean
2015/08/14 13:29:19
Done.
| |
1228 | |
1224 net::HttpNetworkSession::Params system_params; | 1229 net::HttpNetworkSession::Params system_params; |
1225 InitializeNetworkSessionParams(&system_params); | 1230 InitializeNetworkSessionParams(&system_params); |
1226 system_params.net_log = net_log_; | 1231 net::URLRequestContextBuilder::SetHttpNetworkSessionComponents( |
1227 system_params.proxy_service = globals_->system_proxy_service.get(); | 1232 &system_params, globals_->system_request_context.get()); |
1228 | 1233 |
1229 globals_->system_http_transaction_factory.reset( | 1234 globals_->system_http_transaction_factory.reset( |
1230 new net::HttpNetworkLayer( | 1235 new net::HttpNetworkLayer( |
1231 new net::HttpNetworkSession(system_params))); | 1236 new net::HttpNetworkSession(system_params))); |
1232 globals_->system_url_request_job_factory.reset( | 1237 globals_->system_request_context->set_http_transaction_factory( |
1233 new net::URLRequestJobFactoryImpl()); | 1238 globals_->system_http_transaction_factory.get()); |
1234 globals_->system_request_context.reset( | 1239 |
1235 ConstructSystemRequestContext(globals_, net_log_)); | |
1236 globals_->system_request_context->set_ssl_config_service( | 1240 globals_->system_request_context->set_ssl_config_service( |
1237 globals_->ssl_config_service.get()); | 1241 globals_->ssl_config_service.get()); |
1238 globals_->system_request_context->set_http_server_properties( | 1242 globals_->system_request_context->set_http_server_properties( |
1239 globals_->http_server_properties->GetWeakPtr()); | 1243 globals_->http_server_properties->GetWeakPtr()); |
1240 } | 1244 } |
1241 | 1245 |
1242 void IOThread::UpdateDnsClientEnabled() { | 1246 void IOThread::UpdateDnsClientEnabled() { |
1243 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 1247 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
1244 } | 1248 } |
1245 | 1249 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1593 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1597 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1594 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1598 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1595 net::QuicVersion version = supported_versions[i]; | 1599 net::QuicVersion version = supported_versions[i]; |
1596 if (net::QuicVersionToString(version) == quic_version) { | 1600 if (net::QuicVersionToString(version) == quic_version) { |
1597 return version; | 1601 return version; |
1598 } | 1602 } |
1599 } | 1603 } |
1600 | 1604 |
1601 return net::QUIC_VERSION_UNSUPPORTED; | 1605 return net::QUIC_VERSION_UNSUPPORTED; |
1602 } | 1606 } |
OLD | NEW |