Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 02b7f2662eb51b8b125e368c9b73d07d5cbae709..1d3fa48049f3a4c96c787373df172a979c71e44f 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -327,6 +327,25 @@ IOThread::Globals::Globals() |
IOThread::Globals::~Globals() {} |
+void IOThread::Globals::InitializeNetworkSessionParams( |
+ net::HttpNetworkSession::Params* params) const { |
+ params->host_resolver = host_resolver.get(); |
+ params->cert_verifier = cert_verifier.get(); |
+ params->server_bound_cert_service = system_server_bound_cert_service.get(); |
+ params->transport_security_state = transport_security_state.get(); |
+ params->proxy_service = proxy_script_fetcher_proxy_service.get(); |
+ params->ssl_config_service = ssl_config_service.get(); |
+ params->http_auth_handler_factory = http_auth_handler_factory.get(); |
+ params->http_server_properties = http_server_properties.get(); |
+ params->network_delegate = system_network_delegate.get(); |
+ params->host_mapping_rules = host_mapping_rules.get(); |
+ params->ignore_certificate_errors = ignore_certificate_errors; |
+ params->http_pipelining_enabled = http_pipelining_enabled; |
+ params->testing_fixed_http_port = testing_fixed_http_port; |
+ params->testing_fixed_https_port = testing_fixed_https_port; |
+} |
+ |
+ |
// |local_state| is passed in explicitly in order to (1) reduce implicit |
// dependencies and (2) make IOThread more flexible for testing. |
IOThread::IOThread( |
@@ -496,30 +515,8 @@ void IOThread::Init() { |
} |
net::HttpNetworkSession::Params session_params; |
- session_params.host_resolver = globals_->host_resolver.get(); |
- session_params.cert_verifier = globals_->cert_verifier.get(); |
- session_params.server_bound_cert_service = |
- globals_->system_server_bound_cert_service.get(); |
- session_params.transport_security_state = |
- globals_->transport_security_state.get(); |
- session_params.proxy_service = |
- globals_->proxy_script_fetcher_proxy_service.get(); |
- session_params.ssl_config_service = globals_->ssl_config_service.get(); |
- session_params.http_auth_handler_factory = |
- globals_->http_auth_handler_factory.get(); |
- session_params.http_server_properties = |
- globals_->http_server_properties.get(); |
- session_params.network_delegate = globals_->system_network_delegate.get(); |
- // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
- // system URLRequestContext too. There's no reason this should be tied to a |
- // profile. |
+ globals_->InitializeNetworkSessionParams(&session_params); |
session_params.net_log = net_log_; |
- session_params.host_mapping_rules = globals_->host_mapping_rules.get(); |
- session_params.ignore_certificate_errors = |
- globals_->ignore_certificate_errors; |
- session_params.http_pipelining_enabled = globals_->http_pipelining_enabled; |
- session_params.testing_fixed_http_port = globals_->testing_fixed_http_port; |
- session_params.testing_fixed_https_port = globals_->testing_fixed_https_port; |
InitializeNetworkOptions(command_line); |
@@ -833,24 +830,8 @@ void IOThread::InitSystemRequestContextOnIOThread() { |
command_line)); |
net::HttpNetworkSession::Params system_params; |
- system_params.host_resolver = globals_->host_resolver.get(); |
- system_params.cert_verifier = globals_->cert_verifier.get(); |
- system_params.server_bound_cert_service = |
- globals_->system_server_bound_cert_service.get(); |
- system_params.transport_security_state = |
- globals_->transport_security_state.get(); |
- system_params.proxy_service = globals_->system_proxy_service.get(); |
Ryan Sleevi
2012/11/30 00:10:05
|proxy_service| is being initialized differently h
Ryan Hamilton
2012/11/30 00:17:59
DOH! Thanks for the catch.
|
- system_params.ssl_config_service = globals_->ssl_config_service.get(); |
- system_params.http_auth_handler_factory = |
- globals_->http_auth_handler_factory.get(); |
- system_params.http_server_properties = globals_->http_server_properties.get(); |
- system_params.network_delegate = globals_->system_network_delegate.get(); |
+ globals_->InitializeNetworkSessionParams(&system_params); |
system_params.net_log = net_log_; |
- system_params.host_mapping_rules = globals_->host_mapping_rules.get(); |
- system_params.ignore_certificate_errors = globals_->ignore_certificate_errors; |
- system_params.http_pipelining_enabled = globals_->http_pipelining_enabled; |
- system_params.testing_fixed_http_port = globals_->testing_fixed_http_port; |
- system_params.testing_fixed_https_port = globals_->testing_fixed_https_port; |
globals_->system_http_transaction_factory.reset( |
new net::HttpNetworkLayer( |