Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: chrome/browser/net/dns_global.h

Issue 27048: Fix a crash when dns prefetching was being shut down without being started.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: drop the ui test Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/net/dns_global.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is the global interface for the dns prefetch services. It centralizes 5 // This is the global interface for the dns prefetch services. It centralizes
6 // initialization, along with all the callbacks etc. to connect to the browser 6 // initialization, along with all the callbacks etc. to connect to the browser
7 // process. This allows the more standard DNS prefetching services, such as 7 // process. This allows the more standard DNS prefetching services, such as
8 // provided by DnsMaster to be left as more generally usable code, and possibly 8 // provided by DnsMaster to be left as more generally usable code, and possibly
9 // be shared across multiple client projects. 9 // be shared across multiple client projects.
10 10
11 #ifndef CHROME_BROWSER_NET_DNS_GLOBAL_H_ 11 #ifndef CHROME_BROWSER_NET_DNS_GLOBAL_H_
12 #define CHROME_BROWSER_NET_DNS_GLOBAL_H_ 12 #define CHROME_BROWSER_NET_DNS_GLOBAL_H_
13 13
14 #include "chrome/browser/net/dns_master.h" 14 #include "chrome/browser/net/dns_master.h"
15 15
16 #include <string> 16 #include <string>
17 17
18 class PrefService; 18 class PrefService;
19 19
20 namespace chrome_browser_net { 20 namespace chrome_browser_net {
21 21
22 // Initialize dns prefetching subsystem. Must be called before any other 22 // Initialize dns prefetching subsystem. Must be called before any other
23 // functions. 23 // functions.
24 void InitDnsPrefetch(PrefService* user_prefs); 24 void InitDnsPrefetch(PrefService* user_prefs);
25 25
26 // Cancel pending lookup requests and don't make new ones. 26 // Cancel pending lookup requests and don't make new ones. Does nothing
27 void ShutdownDnsPrefetch(); 27 // if dns prefetching has not been initialized (to simplify its usage).
28 void EnsureDnsPrefetchShutdown();
28 29
29 // Free all resources allocated by InitDnsPrefetch. After that you must not call 30 // Free all resources allocated by InitDnsPrefetch. After that you must not call
30 // any function from this file. 31 // any function from this file.
31 void FreeDnsPrefetchResources(); 32 void FreeDnsPrefetchResources();
32 33
33 //------------------------------------------------------------------------------ 34 //------------------------------------------------------------------------------
34 // Global APIs relating to Prefetching in browser 35 // Global APIs relating to Prefetching in browser
35 void EnableDnsPrefetch(bool enable); 36 void EnableDnsPrefetch(bool enable);
36 void RegisterPrefs(PrefService* local_state); 37 void RegisterPrefs(PrefService* local_state);
37 void RegisterUserPrefs(PrefService* user_prefs); 38 void RegisterUserPrefs(PrefService* user_prefs);
(...skipping 28 matching lines...) Expand all
66 } 67 }
67 68
68 private: 69 private:
69 DISALLOW_COPY_AND_ASSIGN(DnsPrefetcherInit); 70 DISALLOW_COPY_AND_ASSIGN(DnsPrefetcherInit);
70 }; 71 };
71 72
72 } // namespace chrome_browser_net 73 } // namespace chrome_browser_net
73 74
74 #endif // CHROME_BROWSER_NET_DNS_GLOBAL_H_ 75 #endif // CHROME_BROWSER_NET_DNS_GLOBAL_H_
75 76
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/net/dns_global.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698