summaryrefslogtreecommitdiffstats
path: root/chrome_frame/metrics_service.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 06:33:58 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-28 06:33:58 +0000
commit57cb0f76bceab5f05f3d14a23e764795b476f3d3 (patch)
treea8c549a7c8e18f1e581cfba2ee78bca33699abf9 /chrome_frame/metrics_service.cc
parentd8397a8c9673136fe1deae24367b989e97f54bfb (diff)
downloadchromium_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_frame/metrics_service.cc')
-rw-r--r--chrome_frame/metrics_service.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index 3f22ae5..deb5f20 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -79,7 +79,9 @@
#include "net/base/upload_data.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h"
-#include "net/http/http_network_layer.h"
+#include "net/http/http_network_session.h"
+#include "net/socket/client_socket_factory.h"
+#include "net/spdy/spdy_session_pool.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_status.h"
@@ -178,18 +180,23 @@ class ChromeFrameUploadRequestContext : public net::URLRequestContext {
supported_schemes, url_security_manager_.get(), host_resolver_,
std::string(), false, false);
+ scoped_refptr<net::HttpNetworkSession> network_session =
+ new net::HttpNetworkSession(
+ host_resolver_,
+ cert_verifier_,
+ NULL /* dnsrr_resolver */,
+ NULL /* dns_cert_checker*/,
+ NULL /* ssl_host_info_factory */,
+ proxy_service_,
+ net::ClientSocketFactory::GetDefaultFactory(),
+ ssl_config_service_,
+ new net::SpdySessionPool(ssl_config_service_),
+ http_auth_handler_factory_,
+ network_delegate_,
+ NULL);
+
http_transaction_factory_ = new net::HttpCache(
- net::HttpNetworkLayer::CreateFactory(host_resolver_,
- cert_verifier_,
- NULL /* dnsrr_resovler */,
- NULL /* dns_cert_checker*/,
- NULL /* ssl_host_info */,
- proxy_service_,
- ssl_config_service_,
- http_auth_handler_factory_,
- network_delegate_,
- NULL),
- NULL /* net_log */,
+ network_session,
net::HttpCache::DefaultBackend::InMemory(0));
}