diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 15:10:43 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 15:10:43 +0000 |
commit | fdc58a9963abb0a9f4cac157b2f3f1eac8e4160d (patch) | |
tree | 889dd032162f3c876c2bdcaa84a8b3717f134995 /chrome/browser/net/dns_global.cc | |
parent | 9127ca05f3d1cc8308a35429876b18090814ae73 (diff) | |
download | chromium_src-fdc58a9963abb0a9f4cac157b2f3f1eac8e4160d.zip chromium_src-fdc58a9963abb0a9f4cac157b2f3f1eac8e4160d.tar.gz chromium_src-fdc58a9963abb0a9f4cac157b2f3f1eac8e4160d.tar.bz2 |
Clean up dns prefetch code, and also port it.
BUG=5687, 6683
Review URL: http://codereview.chromium.org/15076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/dns_global.cc')
-rw-r--r-- | chrome/browser/net/dns_global.cc | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc index 3ea79ff..693a2cd 100644 --- a/chrome/browser/net/dns_global.cc +++ b/chrome/browser/net/dns_global.cc @@ -377,13 +377,9 @@ void DnsPrefetchGetHtmlInfo(std::string* output) { static PrefetchObserver dns_resolution_observer; void InitDnsPrefetch(PrefService* user_prefs) { - // Use a large shutdown time so that UI tests (that instigate lookups, and - // then try to shutdown the browser) don't instigate the CHECK about - // "some slaves have not finished" - const TimeDelta kAllowableShutdownTime(TimeDelta::FromSeconds(10)); DCHECK(NULL == dns_master); if (!dns_master) { - dns_master = new DnsMaster(kAllowableShutdownTime); + dns_master = new DnsMaster(); // We did the initialization, so we should prime the pump, and set up // the DNS resolution system to run. off_the_record_observer.Register(); @@ -402,14 +398,8 @@ void InitDnsPrefetch(PrefService* user_prefs) { void ShutdownDnsPrefetch() { DCHECK(NULL != dns_master); - DnsMaster* master = dns_master; + delete dns_master; dns_master = NULL; - if (master->ShutdownSlaves()) { - delete master; - } else { - // Leak instance if shutdown problem. - DCHECK(0); - } } static void DiscardAllPrefetchState() { |