Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Unified Diff: net/http/http_cache.cc

Issue 6402002: Simplify HttpCache/HttpNetworkLayer/HttpNetworkSession interaction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_cache.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.cc
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 3ef5a7b7d18e5fda4635286d0ded6c39df51a1da..1690e551ad5af567b9102286a4403eb39e7d495f 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -33,6 +33,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_response_info.h"
#include "net/http/http_util.h"
+#include "net/socket/client_socket_factory.h"
#include "net/socket/ssl_host_info.h"
#include "net/spdy/spdy_session_pool.h"
@@ -278,7 +279,6 @@ class HttpCache::SSLHostInfoFactoryAdaptor : public SSLHostInfoFactory {
};
//-----------------------------------------------------------------------------
-
HttpCache::HttpCache(HostResolver* host_resolver,
CertVerifier* cert_verifier,
DnsRRResolver* dnsrr_resolver,
@@ -295,21 +295,34 @@ HttpCache::HttpCache(HostResolver* host_resolver,
mode_(NORMAL),
ssl_host_info_factory_(new SSLHostInfoFactoryAdaptor(
ALLOW_THIS_IN_INITIALIZER_LIST(this))),
- network_layer_(HttpNetworkLayer::CreateFactory(host_resolver,
- cert_verifier, dnsrr_resolver, dns_cert_checker_,
- ssl_host_info_factory_.get(),
- proxy_service, ssl_config_service,
- http_auth_handler_factory, network_delegate, net_log)),
+ network_layer_(
+ new HttpNetworkLayer(
+ new HttpNetworkSession(
+ host_resolver,
+ cert_verifier,
+ dnsrr_resolver,
+ dns_cert_checker_,
+ ssl_host_info_factory_.get(),
+ proxy_service,
+ ClientSocketFactory::GetDefaultFactory(),
+ ssl_config_service,
+ new SpdySessionPool(ssl_config_service),
+ http_auth_handler_factory,
+ network_delegate,
+ net_log))),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
}
+
HttpCache::HttpCache(HttpNetworkSession* session,
BackendFactory* backend_factory)
: net_log_(session->net_log()),
backend_factory_(backend_factory),
building_backend_(false),
mode_(NORMAL),
- network_layer_(HttpNetworkLayer::CreateFactory(session)),
+ ssl_host_info_factory_(new SSLHostInfoFactoryAdaptor(
+ ALLOW_THIS_IN_INITIALIZER_LIST(this))),
+ network_layer_(new HttpNetworkLayer(session)),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)) {
}
« no previous file with comments | « net/http/http_cache.h ('k') | net/http/http_network_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698