summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/dns_global.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/net/dns_global.cc')
-rw-r--r--chrome/browser/net/dns_global.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/net/dns_global.cc b/chrome/browser/net/dns_global.cc
index 4e1f1a2..9733e52 100644
--- a/chrome/browser/net/dns_global.cc
+++ b/chrome/browser/net/dns_global.cc
@@ -382,7 +382,7 @@ void InitDnsPrefetch(PrefService* user_prefs) {
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();
@@ -401,14 +401,13 @@ void InitDnsPrefetch(PrefService* user_prefs) {
void ShutdownDnsPrefetch() {
DCHECK(NULL != dns_master);
- DnsMaster* master = dns_master;
+ dns_master->Shutdown();
+}
+
+void FreeDnsPrefetchResources() {
+ DCHECK(NULL != dns_master);
+ delete dns_master;
dns_master = NULL;
- if (master->ShutdownSlaves()) {
- delete master;
- } else {
- // Leak instance if shutdown problem.
- DCHECK(0);
- }
}
static void DiscardAllPrefetchState() {