Index: net/tools/fetch/fetch_client.cc |
diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc |
index 0d9682ffea07e99c9eaa6a8c44fd49413c145e7e..8ba7534a429d19fdb1da4f30bbe375e796894c08 100644 |
--- a/net/tools/fetch/fetch_client.cc |
+++ b/net/tools/fetch/fetch_client.cc |
@@ -20,10 +20,12 @@ |
#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/http/http_request_info.h" |
#include "net/http/http_transaction.h" |
#include "net/proxy/proxy_service.h" |
#include "net/socket/client_socket_factory.h" |
+#include "net/spdy/spdy_session_pool.h" |
void usage(const char* program_name) { |
printf("usage: %s --url=<url> [--n=<clients>] [--stats] [--use_cache]\n", |
@@ -149,24 +151,25 @@ int main(int argc, char**argv) { |
net::HttpTransactionFactory* factory = NULL; |
scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( |
net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); |
+ scoped_refptr<net::HttpNetworkSession> network_session( |
+ new net::HttpNetworkSession( |
+ host_resolver.get(), |
+ cert_verifier.get(), |
+ NULL /* dnsrr_resolver */, |
+ NULL /* dns_cert_checker */, |
+ NULL /* ssl_host_info_factory */, |
+ proxy_service, |
+ net::ClientSocketFactory::GetDefaultFactory(), |
+ ssl_config_service, |
+ new net::SpdySessionPool(NULL), |
+ http_auth_handler_factory.get(), |
+ NULL, |
+ NULL)); |
if (use_cache) { |
- factory = new net::HttpCache(host_resolver.get(), cert_verifier.get(), |
- NULL, NULL, proxy_service, ssl_config_service, |
- http_auth_handler_factory.get(), NULL, NULL, |
- net::HttpCache::DefaultBackend::InMemory(0)); |
+ factory = new net::HttpCache(network_session, |
+ net::HttpCache::DefaultBackend::InMemory(0)); |
} else { |
- factory = new net::HttpNetworkLayer( |
- net::ClientSocketFactory::GetDefaultFactory(), |
- host_resolver.get(), |
- cert_verifier.get(), |
- NULL /* dnsrr_resolver */, |
- NULL /* dns_cert_checker */, |
- NULL /* ssl_host_info_factory */, |
- proxy_service, |
- ssl_config_service, |
- http_auth_handler_factory.get(), |
- NULL, |
- NULL); |
+ factory = new net::HttpNetworkLayer(network_session); |
} |
{ |