summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_cache.cc8
-rw-r--r--net/http/http_cache.h2
-rw-r--r--net/http/http_network_layer.cc12
-rw-r--r--net/http/http_network_layer.h5
-rw-r--r--net/http/http_network_layer_unittest.cc3
-rw-r--r--net/http/http_network_session.cc3
-rw-r--r--net/http/http_network_session.h4
-rw-r--r--net/http/http_network_transaction_unittest.cc3
-rw-r--r--net/http/http_proxy_client_socket_pool_unittest.cc1
-rw-r--r--net/http/http_response_body_drainer_unittest.cc1
10 files changed, 36 insertions, 6 deletions
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 2b2a221..a4a3f74 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -243,7 +243,9 @@ void HttpCache::MetadataWriter::OnIOComplete(int result) {
//-----------------------------------------------------------------------------
-HttpCache::HttpCache(HostResolver* host_resolver, ProxyService* proxy_service,
+HttpCache::HttpCache(HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
+ ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
HttpNetworkDelegate* network_delegate,
@@ -253,8 +255,8 @@ HttpCache::HttpCache(HostResolver* host_resolver, ProxyService* proxy_service,
building_backend_(false),
mode_(NORMAL),
network_layer_(HttpNetworkLayer::CreateFactory(host_resolver,
- proxy_service, ssl_config_service, http_auth_handler_factory,
- network_delegate, net_log)),
+ dnsrr_resolver, proxy_service, ssl_config_service,
+ http_auth_handler_factory, network_delegate, net_log)),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)),
enable_range_support_(true) {
}
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index dc16715..775d035 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -41,6 +41,7 @@ class Entry;
namespace net {
+class DnsRRResolver;
class HostResolver;
class HttpAuthHandlerFactory;
class HttpNetworkDelegate;
@@ -117,6 +118,7 @@ class HttpCache : public HttpTransactionFactory,
// The disk cache is initialized lazily (by CreateTransaction) in this case.
// The HttpCache takes ownership of the |backend_factory|.
HttpCache(HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
index a883db2..a773ac46 100644
--- a/net/http/http_network_layer.cc
+++ b/net/http/http_network_layer.cc
@@ -22,6 +22,7 @@ namespace net {
// static
HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
@@ -30,8 +31,8 @@ HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
DCHECK(proxy_service);
return new HttpNetworkLayer(ClientSocketFactory::GetDefaultFactory(),
- host_resolver, proxy_service, ssl_config_service,
- http_auth_handler_factory,
+ host_resolver, dnsrr_resolver, proxy_service,
+ ssl_config_service, http_auth_handler_factory,
network_delegate,
net_log);
}
@@ -48,6 +49,7 @@ HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
HttpNetworkLayer::HttpNetworkLayer(
ClientSocketFactory* socket_factory,
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
@@ -55,6 +57,7 @@ HttpNetworkLayer::HttpNetworkLayer(
NetLog* net_log)
: socket_factory_(socket_factory),
host_resolver_(host_resolver),
+ dnsrr_resolver_(dnsrr_resolver),
proxy_service_(proxy_service),
ssl_config_service_(ssl_config_service),
session_(NULL),
@@ -70,6 +73,7 @@ HttpNetworkLayer::HttpNetworkLayer(
HttpNetworkLayer::HttpNetworkLayer(
ClientSocketFactory* socket_factory,
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
SpdySessionPool* spdy_session_pool,
@@ -78,6 +82,7 @@ HttpNetworkLayer::HttpNetworkLayer(
NetLog* net_log)
: socket_factory_(socket_factory),
host_resolver_(host_resolver),
+ dnsrr_resolver_(dnsrr_resolver),
proxy_service_(proxy_service),
ssl_config_service_(ssl_config_service),
session_(NULL),
@@ -92,6 +97,7 @@ HttpNetworkLayer::HttpNetworkLayer(
HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session)
: socket_factory_(ClientSocketFactory::GetDefaultFactory()),
+ dnsrr_resolver_(NULL),
ssl_config_service_(NULL),
session_(session),
spdy_session_pool_(NULL),
@@ -131,6 +137,7 @@ HttpNetworkSession* HttpNetworkLayer::GetSession() {
spdy_session_pool_.reset(new SpdySessionPool(ssl_config_service_));
session_ = new HttpNetworkSession(
host_resolver_,
+ dnsrr_resolver_,
proxy_service_,
socket_factory_,
ssl_config_service_,
@@ -140,6 +147,7 @@ HttpNetworkSession* HttpNetworkLayer::GetSession() {
net_log_);
// These were just temps for lazy-initializing HttpNetworkSession.
host_resolver_ = NULL;
+ dnsrr_resolver_ = NULL;
proxy_service_ = NULL;
socket_factory_ = NULL;
http_auth_handler_factory_ = NULL;
diff --git a/net/http/http_network_layer.h b/net/http/http_network_layer.h
index dc98c35..7872fdd 100644
--- a/net/http/http_network_layer.h
+++ b/net/http/http_network_layer.h
@@ -16,6 +16,7 @@
namespace net {
class ClientSocketFactory;
+class DnsRRResolver;
class HostResolver;
class HttpAuthHandlerFactory;
class HttpNetworkDelegate;
@@ -31,6 +32,7 @@ class HttpNetworkLayer : public HttpTransactionFactory, public NonThreadSafe {
// the lifetime of HttpNetworkLayer.
HttpNetworkLayer(ClientSocketFactory* socket_factory,
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
@@ -41,6 +43,7 @@ class HttpNetworkLayer : public HttpTransactionFactory, public NonThreadSafe {
HttpNetworkLayer(
ClientSocketFactory* socket_factory,
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
SpdySessionPool* spdy_session_pool,
@@ -55,6 +58,7 @@ class HttpNetworkLayer : public HttpTransactionFactory, public NonThreadSafe {
// and allows other implementations to be substituted.
static HttpTransactionFactory* CreateFactory(
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
SSLConfigService* ssl_config_service,
HttpAuthHandlerFactory* http_auth_handler_factory,
@@ -91,6 +95,7 @@ class HttpNetworkLayer : public HttpTransactionFactory, public NonThreadSafe {
// The host resolver and proxy service that will be used when lazily
// creating |session_|.
HostResolver* host_resolver_;
+ DnsRRResolver* dnsrr_resolver_;
scoped_refptr<ProxyService> proxy_service_;
// The SSL config service being used for the session.
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc
index 90a9adc..378962e 100644
--- a/net/http/http_network_layer_unittest.cc
+++ b/net/http/http_network_layer_unittest.cc
@@ -24,6 +24,7 @@ TEST_F(HttpNetworkLayerTest, CreateAndDestroy) {
net::HttpNetworkLayer factory(
NULL,
&host_resolver,
+ NULL /* dnsrr_resolver */,
net::ProxyService::CreateDirect(),
new net::SSLConfigServiceDefaults,
NULL,
@@ -41,6 +42,7 @@ TEST_F(HttpNetworkLayerTest, Suspend) {
net::HttpNetworkLayer factory(
NULL,
&host_resolver,
+ NULL /* dnsrr_resolver */,
net::ProxyService::CreateDirect(),
new net::SSLConfigServiceDefaults,
NULL,
@@ -87,6 +89,7 @@ TEST_F(HttpNetworkLayerTest, GET) {
net::HttpNetworkLayer factory(
&mock_socket_factory,
&host_resolver,
+ NULL /* dnsrr_resolver */,
net::ProxyService::CreateDirect(),
new net::SSLConfigServiceDefaults,
NULL,
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 7b4fe0e..4613629 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -20,6 +20,7 @@ namespace net {
// TODO(mbelshe): Move the socket factories into HttpStreamFactory.
HttpNetworkSession::HttpNetworkSession(
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
ClientSocketFactory* client_socket_factory,
SSLConfigService* ssl_config_service,
@@ -29,11 +30,13 @@ HttpNetworkSession::HttpNetworkSession(
NetLog* net_log)
: socket_factory_(client_socket_factory),
host_resolver_(host_resolver),
+ dnsrr_resolver_(dnsrr_resolver),
proxy_service_(proxy_service),
ssl_config_service_(ssl_config_service),
socket_pool_manager_(net_log,
client_socket_factory,
host_resolver,
+ dnsrr_resolver,
proxy_service,
ssl_config_service),
spdy_session_pool_(spdy_session_pool),
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index c0d1ca9..0cfe08f 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -29,6 +29,7 @@ class Value;
namespace net {
class ClientSocketFactory;
+class DnsRRResolver;
class HttpAuthHandlerFactory;
class HttpNetworkDelegate;
class HttpNetworkSessionPeer;
@@ -45,6 +46,7 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>,
public:
HttpNetworkSession(
HostResolver* host_resolver,
+ DnsRRResolver* dnsrr_resolver,
ProxyService* proxy_service,
ClientSocketFactory* client_socket_factory,
SSLConfigService* ssl_config_service,
@@ -103,6 +105,7 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>,
// SSL sockets come from the socket_factory().
ClientSocketFactory* socket_factory() { return socket_factory_; }
HostResolver* host_resolver() { return host_resolver_; }
+ DnsRRResolver* dnsrr_resolver() { return dnsrr_resolver_; }
ProxyService* proxy_service() { return proxy_service_; }
SSLConfigService* ssl_config_service() { return ssl_config_service_; }
SpdySessionPool* spdy_session_pool() { return spdy_session_pool_.get(); }
@@ -138,6 +141,7 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>,
SSLClientAuthCache ssl_client_auth_cache_;
HttpAlternateProtocols alternate_protocols_;
HostResolver* const host_resolver_;
+ DnsRRResolver* dnsrr_resolver_;
scoped_refptr<ProxyService> proxy_service_;
scoped_refptr<SSLConfigService> ssl_config_service_;
ClientSocketPoolManager socket_pool_manager_;
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index ca3caac..508cc28 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -104,6 +104,7 @@ ProxyService* CreateFixedProxyService(const std::string& proxy) {
HttpNetworkSession* CreateSession(SessionDependencies* session_deps) {
return new HttpNetworkSession(session_deps->host_resolver.get(),
+ NULL /* dnsrr_resolver */,
session_deps->proxy_service,
&session_deps->socket_factory,
session_deps->ssl_config_service,
@@ -304,7 +305,7 @@ template<>
CaptureGroupNameSSLSocketPool::CaptureGroupNameSocketPool(
HttpNetworkSession* session)
: SSLClientSocketPool(0, 0, NULL, session->host_resolver(), NULL, NULL,
- NULL, NULL, NULL, NULL) {}
+ NULL, NULL, NULL, NULL, NULL) {}
//-----------------------------------------------------------------------------
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index e823596..4fe8873 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -59,6 +59,7 @@ class HttpProxyClientSocketPoolTest : public TestWithHttpParam {
http_auth_handler_factory_(
HttpAuthHandlerFactory::CreateDefault(host_resolver_.get())),
session_(new HttpNetworkSession(host_resolver_.get(),
+ NULL /* dnsrr_resolver */,
ProxyService::CreateDirect(),
&socket_factory_,
new SSLConfigServiceDefaults,
diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc
index 4858a27..78168fd 100644
--- a/net/http/http_response_body_drainer_unittest.cc
+++ b/net/http/http_response_body_drainer_unittest.cc
@@ -173,6 +173,7 @@ class HttpResponseBodyDrainerTest : public testing::Test {
HttpResponseBodyDrainerTest()
: session_(new HttpNetworkSession(
NULL,
+ NULL,
ProxyService::CreateDirect(),
NULL,
new SSLConfigServiceDefaults,