Index: chrome/browser/net/dns_global.h |
diff --git a/chrome/browser/net/dns_global.h b/chrome/browser/net/dns_global.h |
index 2ba0e703f421e042c2ee35573c13a6b6fd000f4c..80cf6ff9b7820bd635b25b1783c7d43fa7ab3857 100644 |
--- a/chrome/browser/net/dns_global.h |
+++ b/chrome/browser/net/dns_global.h |
@@ -19,10 +19,17 @@ class PrefService; |
namespace chrome_browser_net { |
-// Functions to initialize our global state so that PrefetchDns() can be called. |
+// Initialize dns prefetching subsystem. Must be called before any other |
+// functions. |
void InitDnsPrefetch(PrefService* user_prefs); |
+ |
+// Cancel pending lookup requests and don't make new ones. |
void ShutdownDnsPrefetch(); |
+// Free all resources allocated by InitDnsPrefetch. After that you must not call |
+// any function from this file. |
+void FreeDnsPrefetchResources(); |
+ |
//------------------------------------------------------------------------------ |
// Global APIs relating to Prefetching in browser |
void EnableDnsPrefetch(bool enable); |
@@ -53,7 +60,10 @@ class DnsPrefetcherInit { |
explicit DnsPrefetcherInit(PrefService* user_prefs) { |
InitDnsPrefetch(user_prefs); |
} |
- ~DnsPrefetcherInit() {ShutdownDnsPrefetch();} |
+ |
+ ~DnsPrefetcherInit() { |
+ FreeDnsPrefetchResources(); |
+ } |
private: |
DISALLOW_COPY_AND_ASSIGN(DnsPrefetcherInit); |