diff options
-rw-r--r-- | chrome/browser/io_thread.cc | 2 | ||||
-rw-r--r-- | chrome/browser/io_thread.h | 5 | ||||
-rw-r--r-- | chrome/browser/net/dns_probe_service.h | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index c9bd57b..29c6c4a 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -27,6 +27,7 @@ #include "chrome/browser/net/chrome_network_delegate.h" #include "chrome/browser/net/chrome_url_request_context.h" #include "chrome/browser/net/connect_interceptor.h" +#include "chrome/browser/net/dns_probe_service.h" #include "chrome/browser/net/http_pipelining_compatibility_client.h" #include "chrome/browser/net/load_time_stats.h" #include "chrome/browser/net/pref_proxy_config_tracker.h" @@ -464,6 +465,7 @@ void IOThread::Init() { new net::ServerBoundCertService( new net::DefaultServerBoundCertStore(NULL), base::WorkerPool::GetTaskRunner(true))); + globals_->dns_probe_service.reset(new chrome_browser_net::DnsProbeService()); globals_->load_time_stats.reset(new chrome_browser_net::LoadTimeStats()); globals_->host_mapping_rules.reset(new net::HostMappingRules()); globals_->http_user_agent_settings.reset( diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h index ae1af7d..8ad2453 100644 --- a/chrome/browser/io_thread.h +++ b/chrome/browser/io_thread.h @@ -24,6 +24,7 @@ class PrefService; class SystemURLRequestContextGetter; namespace chrome_browser_net { +class DnsProbeService; class HttpPipeliningCompatibilityClient; class LoadTimeStats; } @@ -121,6 +122,10 @@ class IOThread : public content::BrowserThreadDelegate { bool http_pipelining_enabled; uint16 testing_fixed_http_port; uint16 testing_fixed_https_port; + // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a + // main frame load fails with a DNS error in order to provide more useful + // information to the renderer so it can show a more specific error page. + scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; }; // |net_log| must either outlive the IOThread or be NULL. diff --git a/chrome/browser/net/dns_probe_service.h b/chrome/browser/net/dns_probe_service.h index 22430b2..206344d 100644 --- a/chrome/browser/net/dns_probe_service.h +++ b/chrome/browser/net/dns_probe_service.h @@ -28,7 +28,7 @@ class DnsProbeService { typedef base::Callback<void(Result result)> CallbackType; DnsProbeService(); - ~DnsProbeService(); + virtual ~DnsProbeService(); void ProbeDns(const CallbackType& callback); |