diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 06:33:58 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-28 06:33:58 +0000 |
commit | 57cb0f76bceab5f05f3d14a23e764795b476f3d3 (patch) | |
tree | a8c549a7c8e18f1e581cfba2ee78bca33699abf9 /chrome/browser/io_thread.cc | |
parent | d8397a8c9673136fe1deae24367b989e97f54bfb (diff) | |
download | chromium_src-57cb0f76bceab5f05f3d14a23e764795b476f3d3.zip chromium_src-57cb0f76bceab5f05f3d14a23e764795b476f3d3.tar.gz chromium_src-57cb0f76bceab5f05f3d14a23e764795b476f3d3.tar.bz2 |
Simplify HttpCache/HttpNetworkLayer/HttpNetworkSession interaction.
Eliminate lazy initialization of HttpNetworkSession in HttpNetworkLayer.
* This eliminates the need to update parameters for HttpNetworkLayer, it just takes a HttpNetworkSession.
* It is OK to eliminate lazy initialization since these variables are cheap.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6402002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/io_thread.cc')
-rw-r--r-- | chrome/browser/io_thread.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 8141719..d5af8f0 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -38,6 +38,7 @@ #include "net/http/http_auth_filter.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_network_layer.h" +#include "net/http/http_network_session.h" #if defined(USE_NSS) #include "net/ocsp/nss_ocsp.h" #endif // defined(USE_NSS) @@ -333,20 +334,22 @@ void IOThread::Init() { // For the ProxyScriptFetcher, we use a direct ProxyService. globals_->proxy_script_fetcher_proxy_service = net::ProxyService::CreateDirectWithNetLog(net_log_); - globals_->proxy_script_fetcher_http_transaction_factory.reset( - new net::HttpNetworkLayer( - globals_->client_socket_factory, + scoped_refptr<net::HttpNetworkSession> network_session( + new net::HttpNetworkSession( globals_->host_resolver.get(), globals_->cert_verifier.get(), globals_->dnsrr_resolver.get(), NULL /* dns_cert_checker */, NULL /* ssl_host_info_factory */, globals_->proxy_script_fetcher_proxy_service.get(), + globals_->client_socket_factory, globals_->ssl_config_service.get(), new net::SpdySessionPool(globals_->ssl_config_service.get()), globals_->http_auth_handler_factory.get(), &globals_->network_delegate, net_log_)); + globals_->proxy_script_fetcher_http_transaction_factory.reset( + new net::HttpNetworkLayer(network_session)); scoped_refptr<net::URLRequestContext> proxy_script_fetcher_context = ConstructProxyScriptFetcherContext(globals_, net_log_); |