summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 14:32:37 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 14:32:37 +0000
commit2db58053f8e04deaf129724bdf8ec0b326fb65ac (patch)
treea4bddfa6d1b53f6b314fe7917954875b1a348200 /chrome/browser
parent15d2d47109de2bdfdece9cdb1956b3e8ab73c475 (diff)
downloadchromium_src-2db58053f8e04deaf129724bdf8ec0b326fb65ac.zip
chromium_src-2db58053f8e04deaf129724bdf8ec0b326fb65ac.tar.gz
chromium_src-2db58053f8e04deaf129724bdf8ec0b326fb65ac.tar.bz2
Revert revert "net: plumb DnsRRResolver from IOThread to HttpNetworkSession."
Landed in r61789, reverted in r61801 in case it was causing Vista Tests (dbg)(1) to crash. Turns out that it wasn't, so this is the reland. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/io_thread.cc2
-rw-r--r--chrome/browser/io_thread.h2
-rw-r--r--chrome/browser/net/chrome_url_request_context.cc3
-rw-r--r--chrome/browser/net/chrome_url_request_context.h3
-rw-r--r--chrome/browser/net/connection_tester.cc8
5 files changed, 16 insertions, 2 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 2b55f6e..b76e895 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/net/passive_log_collector.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/url_fetcher.h"
+#include "net/base/dnsrr_resolver.h"
#include "net/base/mapped_host_resolver.h"
#include "net/base/host_cache.h"
#include "net/base/host_resolver.h"
@@ -171,6 +172,7 @@ void IOThread::Init() {
globals_->host_resolver.reset(
CreateGlobalHostResolver(globals_->net_log.get()));
+ globals_->dnsrr_resolver.reset(new net::DnsRRResolver);
globals_->http_auth_handler_factory.reset(CreateDefaultAuthHandlerFactory(
globals_->host_resolver.get()));
}
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h
index a51d515..9485e0b 100644
--- a/chrome/browser/io_thread.h
+++ b/chrome/browser/io_thread.h
@@ -24,6 +24,7 @@ class Predictor;
} // namespace chrome_browser_net
namespace net {
+class DnsRRResolver;
class HttpAuthHandlerFactory;
class URLSecurityManager;
} // namespace net
@@ -33,6 +34,7 @@ class IOThread : public BrowserProcessSubThread {
struct Globals {
scoped_ptr<ChromeNetLog> net_log;
scoped_ptr<net::HostResolver> host_resolver;
+ scoped_ptr<net::DnsRRResolver> dnsrr_resolver;
scoped_ptr<net::HttpAuthHandlerFactory> http_auth_handler_factory;
scoped_ptr<net::URLSecurityManager> url_security_manager;
ChromeNetworkDelegate network_delegate;
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 5819148..79a29c1 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -272,6 +272,7 @@ ChromeURLRequestContext* FactoryForOriginal::Create() {
ChromeThread::GetMessageLoopProxyForThread(ChromeThread::CACHE));
net::HttpCache* cache =
new net::HttpCache(context->host_resolver(),
+ context->dnsrr_resolver(),
context->proxy_service(),
context->ssl_config_service(),
context->http_auth_handler_factory(),
@@ -404,6 +405,7 @@ ChromeURLRequestContext* FactoryForOffTheRecord::Create() {
net::HttpCache* cache =
new net::HttpCache(context->host_resolver(),
+ context->dnsrr_resolver(),
context->proxy_service(),
context->ssl_config_service(),
context->http_auth_handler_factory(),
@@ -499,6 +501,7 @@ ChromeURLRequestContext* FactoryForMedia::Create() {
// If original HttpCache doesn't exist, simply construct one with a whole
// new set of network stack.
cache = new net::HttpCache(main_context->host_resolver(),
+ main_context->dnsrr_resolver(),
main_context->proxy_service(),
main_context->ssl_config_service(),
main_context->http_auth_handler_factory(),
diff --git a/chrome/browser/net/chrome_url_request_context.h b/chrome/browser/net/chrome_url_request_context.h
index eccf823..183ad4a 100644
--- a/chrome/browser/net/chrome_url_request_context.h
+++ b/chrome/browser/net/chrome_url_request_context.h
@@ -127,6 +127,9 @@ class ChromeURLRequestContext : public URLRequestContext {
void set_host_resolver(net::HostResolver* resolver) {
host_resolver_ = resolver;
}
+ void set_dnsrr_resolver(net::DnsRRResolver* dnsrr_resolver) {
+ dnsrr_resolver_ = dnsrr_resolver;
+ }
void set_http_transaction_factory(net::HttpTransactionFactory* factory) {
http_transaction_factory_ = factory;
}
diff --git a/chrome/browser/net/connection_tester.cc b/chrome/browser/net/connection_tester.cc
index 0ed9f94..91d6afe 100644
--- a/chrome/browser/net/connection_tester.cc
+++ b/chrome/browser/net/connection_tester.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/importer/firefox_proxy_settings.h"
#include "chrome/common/chrome_switches.h"
#include "net/base/cookie_monster.h"
+#include "net/base/dnsrr_resolver.h"
#include "net/base/host_resolver.h"
#include "net/base/host_resolver_impl.h"
#include "net/base/io_buffer.h"
@@ -53,13 +54,15 @@ class ExperimentURLRequestContext : public URLRequestContext {
// The rest of the dependencies are standard, and don't depend on the
// experiment being run.
+ dnsrr_resolver_ = new net::DnsRRResolver;
ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_);
ssl_config_service_ = new net::SSLConfigServiceDefaults;
http_auth_handler_factory_ = net::HttpAuthHandlerFactory::CreateDefault(
host_resolver_);
http_transaction_factory_ = new net::HttpCache(
- net::HttpNetworkLayer::CreateFactory(host_resolver_, proxy_service_,
- ssl_config_service_, http_auth_handler_factory_, NULL, NULL),
+ net::HttpNetworkLayer::CreateFactory(host_resolver_, dnsrr_resolver_,
+ proxy_service_, ssl_config_service_, http_auth_handler_factory_,
+ NULL, NULL),
net::HttpCache::DefaultBackend::InMemory(0));
// In-memory cookie store.
cookie_store_ = new net::CookieMonster(NULL, NULL);
@@ -72,6 +75,7 @@ class ExperimentURLRequestContext : public URLRequestContext {
delete ftp_transaction_factory_;
delete http_transaction_factory_;
delete http_auth_handler_factory_;
+ delete dnsrr_resolver_;
delete host_resolver_;
}