diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 15:18:58 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 15:18:58 +0000 |
commit | 51c07140c9533c09f348d9fc7dfe5aea6341e618 (patch) | |
tree | df239e1fb59cc734a2010ea2d0b34bcf371646e6 /net | |
parent | b6207ced7803f1aa72ca31c02705d148ef718cd8 (diff) | |
download | chromium_src-51c07140c9533c09f348d9fc7dfe5aea6341e618.zip chromium_src-51c07140c9533c09f348d9fc7dfe5aea6341e618.tar.gz chromium_src-51c07140c9533c09f348d9fc7dfe5aea6341e618.tar.bz2 |
net: plumb DnsRRResolver from IOThread to HttpNetworkSession.
This patch gets us most of the way. The next patch finishes plumbing
into the SSL client socket pool.
BUG=none
TEST=none
http://codereview.chromium.org/3533013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61789 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
22 files changed, 76 insertions, 13 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 02d4a5f..8a7a902 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, diff --git a/net/proxy/proxy_script_fetcher_unittest.cc b/net/proxy/proxy_script_fetcher_unittest.cc index 64754a4..ce54a9b 100644 --- a/net/proxy/proxy_script_fetcher_unittest.cc +++ b/net/proxy/proxy_script_fetcher_unittest.cc @@ -41,8 +41,8 @@ class RequestContext : public URLRequestContext { ssl_config_service_ = new net::SSLConfigServiceDefaults; http_transaction_factory_ = new net::HttpCache( - net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_, - ssl_config_service_, NULL, NULL, NULL), + net::HttpNetworkLayer::CreateFactory(host_resolver_, NULL, + proxy_service_, ssl_config_service_, NULL, NULL, NULL), net::HttpCache::DefaultBackend::InMemory(0)); } diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc index 423f8b2..264cdf8 100644 --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc @@ -56,11 +56,13 @@ ClientSocketPoolManager::ClientSocketPoolManager( NetLog* net_log, ClientSocketFactory* socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, ProxyService* proxy_service, SSLConfigService* ssl_config_service) : net_log_(net_log), socket_factory_(socket_factory), host_resolver_(host_resolver), + dnsrr_resolver_(dnsrr_resolver), proxy_service_(proxy_service), ssl_config_service_(ssl_config_service), tcp_pool_histograms_("TCP"), @@ -75,6 +77,7 @@ ClientSocketPoolManager::ClientSocketPoolManager( g_max_sockets, g_max_sockets_per_group, &ssl_pool_histograms_, host_resolver, + dnsrr_resolver, socket_factory, tcp_socket_pool_.get(), NULL /* no socks proxy */, @@ -222,6 +225,7 @@ HttpProxyClientSocketPool* ClientSocketPoolManager::GetSocketPoolForHTTPProxy( g_max_sockets_per_proxy_server, g_max_sockets_per_group, &ssl_for_https_proxy_pool_histograms_, host_resolver_, + dnsrr_resolver_, socket_factory_, tcp_https_ret.first->second /* https proxy */, NULL /* no socks proxy */, @@ -255,6 +259,7 @@ SSLClientSocketPool* ClientSocketPoolManager::GetSocketPoolForSSLWithProxy( g_max_sockets_per_proxy_server, g_max_sockets_per_group, &ssl_pool_histograms_, host_resolver_, + dnsrr_resolver_, socket_factory_, NULL, /* no tcp pool, we always go through a proxy */ GetSocketPoolForSOCKSProxy(proxy_server), diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h index 02a73a9..c455956 100644 --- a/net/socket/client_socket_pool_manager.h +++ b/net/socket/client_socket_pool_manager.h @@ -25,6 +25,7 @@ namespace net { class ClientSocketFactory; class ClientSocketPoolHistograms; +class DnsRRResolver; class HostPortPair; class HttpProxyClientSocketPool; class HostResolver; @@ -58,6 +59,7 @@ class ClientSocketPoolManager : public NonThreadSafe { ClientSocketPoolManager(NetLog* net_log, ClientSocketFactory* socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, ProxyService* proxy_service, SSLConfigService* ssl_config_service); ~ClientSocketPoolManager(); @@ -100,6 +102,7 @@ class ClientSocketPoolManager : public NonThreadSafe { NetLog* const net_log_; ClientSocketFactory* const socket_factory_; HostResolver* const host_resolver_; + DnsRRResolver* dnsrr_resolver_; const scoped_refptr<ProxyService> proxy_service_; const scoped_refptr<SSLConfigService> ssl_config_service_; diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 1cf894a..cba4b1c 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -1242,7 +1242,7 @@ MockSSLClientSocketPool::MockSSLClientSocketPool( ClientSocketFactory* socket_factory, TCPClientSocketPool* tcp_pool) : SSLClientSocketPool(max_sockets, max_sockets_per_group, histograms, - NULL, socket_factory, + NULL, NULL, socket_factory, tcp_pool, NULL, NULL, NULL, NULL), client_socket_factory_(socket_factory), diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc index ceea81b..cdb877d 100644 --- a/net/socket/ssl_client_socket_pool.cc +++ b/net/socket/ssl_client_socket_pool.cc @@ -75,6 +75,7 @@ SSLConnectJob::SSLConnectJob( HttpProxyClientSocketPool* http_proxy_pool, ClientSocketFactory* client_socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, Delegate* delegate, NetLog* net_log) : ConnectJob(group_name, timeout_duration, delegate, @@ -85,6 +86,7 @@ SSLConnectJob::SSLConnectJob( http_proxy_pool_(http_proxy_pool), client_socket_factory_(client_socket_factory), resolver_(host_resolver), + dnsrr_resolver_(dnsrr_resolver), ALLOW_THIS_IN_INITIALIZER_LIST( callback_(this, &SSLConnectJob::OnIOComplete)) {} @@ -338,8 +340,8 @@ ConnectJob* SSLClientSocketPool::SSLConnectJobFactory::NewConnectJob( ConnectJob::Delegate* delegate) const { return new SSLConnectJob(group_name, request.params(), ConnectionTimeout(), tcp_pool_, socks_pool_, http_proxy_pool_, - client_socket_factory_, host_resolver_, delegate, - net_log_); + client_socket_factory_, host_resolver_, + dnsrr_resolver_, delegate, net_log_); } SSLClientSocketPool::SSLConnectJobFactory::SSLConnectJobFactory( @@ -348,12 +350,14 @@ SSLClientSocketPool::SSLConnectJobFactory::SSLConnectJobFactory( HttpProxyClientSocketPool* http_proxy_pool, ClientSocketFactory* client_socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, NetLog* net_log) : tcp_pool_(tcp_pool), socks_pool_(socks_pool), http_proxy_pool_(http_proxy_pool), client_socket_factory_(client_socket_factory), host_resolver_(host_resolver), + dnsrr_resolver_(dnsrr_resolver), net_log_(net_log) { base::TimeDelta max_transport_timeout = base::TimeDelta(); base::TimeDelta pool_timeout; @@ -378,6 +382,7 @@ SSLClientSocketPool::SSLClientSocketPool( int max_sockets_per_group, ClientSocketPoolHistograms* histograms, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, ClientSocketFactory* client_socket_factory, TCPClientSocketPool* tcp_pool, SOCKSClientSocketPool* socks_pool, @@ -393,7 +398,7 @@ SSLClientSocketPool::SSLClientSocketPool( base::TimeDelta::FromSeconds(kUsedIdleSocketTimeout), new SSLConnectJobFactory(tcp_pool, socks_pool, http_proxy_pool, client_socket_factory, host_resolver, - net_log)), + dnsrr_resolver, net_log)), ssl_config_service_(ssl_config_service) { if (ssl_config_service_) ssl_config_service_->AddObserver(this); diff --git a/net/socket/ssl_client_socket_pool.h b/net/socket/ssl_client_socket_pool.h index 6aff091..2c75e03 100644 --- a/net/socket/ssl_client_socket_pool.h +++ b/net/socket/ssl_client_socket_pool.h @@ -24,6 +24,7 @@ namespace net { class ClientSocketFactory; class ConnectJobFactory; +class DnsRRResolver; class HttpProxyClientSocketPool; class HttpProxySocketParams; class SOCKSClientSocketPool; @@ -91,6 +92,7 @@ class SSLConnectJob : public ConnectJob { HttpProxyClientSocketPool* http_proxy_pool, ClientSocketFactory* client_socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, Delegate* delegate, NetLog* net_log); virtual ~SSLConnectJob(); @@ -138,6 +140,7 @@ class SSLConnectJob : public ConnectJob { HttpProxyClientSocketPool* const http_proxy_pool_; ClientSocketFactory* const client_socket_factory_; HostResolver* const resolver_; + DnsRRResolver* dnsrr_resolver_; State next_state_; CompletionCallbackImpl<SSLConnectJob> callback_; @@ -162,6 +165,7 @@ class SSLClientSocketPool : public ClientSocketPool, int max_sockets_per_group, ClientSocketPoolHistograms* histograms, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, ClientSocketFactory* client_socket_factory, TCPClientSocketPool* tcp_pool, SOCKSClientSocketPool* socks_pool, @@ -228,6 +232,7 @@ class SSLClientSocketPool : public ClientSocketPool, HttpProxyClientSocketPool* http_proxy_pool, ClientSocketFactory* client_socket_factory, HostResolver* host_resolver, + DnsRRResolver* dnsrr_resolver, NetLog* net_log); virtual ~SSLConnectJobFactory() {} @@ -246,6 +251,7 @@ class SSLClientSocketPool : public ClientSocketPool, HttpProxyClientSocketPool* const http_proxy_pool_; ClientSocketFactory* const client_socket_factory_; HostResolver* const host_resolver_; + DnsRRResolver* dnsrr_resolver_; base::TimeDelta timeout_; NetLog* net_log_; diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc index 91290bb..2cc564bf 100644 --- a/net/socket/ssl_client_socket_pool_unittest.cc +++ b/net/socket/ssl_client_socket_pool_unittest.cc @@ -39,6 +39,7 @@ class SSLClientSocketPoolTest : public testing::Test { http_auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault( host_resolver_.get())), session_(new HttpNetworkSession(host_resolver_.get(), + NULL /* dnsrr_resolver */, ProxyService::CreateDirect(), &socket_factory_, new SSLConfigServiceDefaults, @@ -92,6 +93,7 @@ class SSLClientSocketPoolTest : public testing::Test { kMaxSocketsPerGroup, ssl_histograms_.get(), NULL, + NULL /* dnsrr_resolver */, &socket_factory_, tcp_pool ? &tcp_socket_pool_ : NULL, socks_pool ? &socks_socket_pool_ : NULL, diff --git a/net/spdy/spdy_test_util.h b/net/spdy/spdy_test_util.h index 0da4d98..6304c74 100644 --- a/net/spdy/spdy_test_util.h +++ b/net/spdy/spdy_test_util.h @@ -335,6 +335,7 @@ class SpdySessionDependencies { static HttpNetworkSession* SpdyCreateSession( SpdySessionDependencies* session_deps) { return new HttpNetworkSession(session_deps->host_resolver.get(), + NULL /* dnsrr_resolver */, session_deps->proxy_service, session_deps->socket_factory.get(), session_deps->ssl_config_service, @@ -346,6 +347,7 @@ class SpdySessionDependencies { static HttpNetworkSession* SpdyCreateSessionDeterministic( SpdySessionDependencies* session_deps) { return new HttpNetworkSession(session_deps->host_resolver.get(), + NULL /* dnsrr_resolver */, session_deps->proxy_service, session_deps-> deterministic_socket_factory.get(), @@ -368,6 +370,7 @@ class SpdyURLRequestContext : public URLRequestContext { http_transaction_factory_ = new net::HttpCache( new HttpNetworkLayer(&socket_factory_, host_resolver_, + NULL /* dnsrr_resolver */, proxy_service_, ssl_config_service_, new SpdySessionPool(NULL), diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc index 9089462..14f7afb 100644 --- a/net/tools/fetch/fetch_client.cc +++ b/net/tools/fetch/fetch_client.cc @@ -147,13 +147,14 @@ int main(int argc, char**argv) { scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory( net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); if (use_cache) { - factory = new net::HttpCache(host_resolver.get(), proxy_service, + factory = new net::HttpCache(host_resolver.get(), NULL, proxy_service, ssl_config_service, http_auth_handler_factory.get(), NULL, NULL, net::HttpCache::DefaultBackend::InMemory(0)); } else { factory = new net::HttpNetworkLayer( net::ClientSocketFactory::GetDefaultFactory(), host_resolver.get(), + NULL /* dnsrr_resolver */, proxy_service, ssl_config_service, http_auth_handler_factory.get(), diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index 0ea8477..329f83f 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -10,6 +10,7 @@ URLRequestContext::URLRequestContext() : net_log_(NULL), + dnsrr_resolver_(NULL), http_transaction_factory_(NULL), ftp_transaction_factory_(NULL), http_auth_handler_factory_(NULL), diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h index 5198fa3..96de77d 100644 --- a/net/url_request/url_request_context.h +++ b/net/url_request/url_request_context.h @@ -22,6 +22,7 @@ namespace net { class CookiePolicy; class CookieStore; +class DnsRRResolver; class FtpTransactionFactory; class HostResolver; class HttpAuthHandlerFactory; @@ -46,6 +47,10 @@ class URLRequestContext return host_resolver_; } + net::DnsRRResolver* dnsrr_resolver() const { + return dnsrr_resolver_; + } + // Get the proxy service for this context. net::ProxyService* proxy_service() const { return proxy_service_; @@ -113,6 +118,7 @@ class URLRequestContext // subclasses. net::NetLog* net_log_; net::HostResolver* host_resolver_; + net::DnsRRResolver* dnsrr_resolver_; scoped_refptr<net::ProxyService> proxy_service_; scoped_refptr<net::SSLConfigService> ssl_config_service_; net::HttpTransactionFactory* http_transaction_factory_; diff --git a/net/url_request/url_request_unittest.h b/net/url_request/url_request_unittest.h index 706aff9..99aeda5 100644 --- a/net/url_request/url_request_unittest.h +++ b/net/url_request/url_request_unittest.h @@ -161,6 +161,7 @@ class TestURLRequestContext : public URLRequestContext { host_resolver_); http_transaction_factory_ = new net::HttpCache( net::HttpNetworkLayer::CreateFactory(host_resolver_, + NULL, proxy_service_, ssl_config_service_, http_auth_handler_factory_, |