OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 Predictor to be left as more generally usable code, and possibly | 8 // provided by Predictor 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 |
(...skipping 23 matching lines...) Expand all Loading... |
34 const std::vector<GURL>& urls_to_prefetch, | 34 const std::vector<GURL>& urls_to_prefetch, |
35 ListValue* referral_list); | 35 ListValue* referral_list); |
36 | 36 |
37 // Free all resources allocated by FinalizePredictorInitialization. After that | 37 // Free all resources allocated by FinalizePredictorInitialization. After that |
38 // you must not call any function from this file. | 38 // you must not call any function from this file. |
39 void FreePredictorResources(); | 39 void FreePredictorResources(); |
40 | 40 |
41 //------------------------------------------------------------------------------ | 41 //------------------------------------------------------------------------------ |
42 // Global APIs relating to predictions in browser. | 42 // Global APIs relating to predictions in browser. |
43 void EnablePredictor(bool enable); | 43 void EnablePredictor(bool enable); |
| 44 void RegisterPrefs(PrefService* local_state); |
44 void RegisterUserPrefs(PrefService* user_prefs); | 45 void RegisterUserPrefs(PrefService* user_prefs); |
45 | 46 |
46 // Renderer bundles up list and sends to this browser API via IPC. | 47 // Renderer bundles up list and sends to this browser API via IPC. |
47 // TODO(jar): Use UrlList instead to include port and scheme. | 48 // TODO(jar): Use UrlList instead to include port and scheme. |
48 void DnsPrefetchList(const NameList& hostnames); | 49 void DnsPrefetchList(const NameList& hostnames); |
49 | 50 |
50 // This API is used by the autocomplete popup box (as user types). | 51 // This API is used by the autocomplete popup box (as user types). |
51 // This will either preresolve the domain name, or possibly preconnect creating | 52 // This will either preresolve the domain name, or possibly preconnect creating |
52 // an open TCP/IP connection to the host. | 53 // an open TCP/IP connection to the host. |
53 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); | 54 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 private: | 97 private: |
97 // Maintain a field trial instance when we do A/B testing. | 98 // Maintain a field trial instance when we do A/B testing. |
98 scoped_refptr<base::FieldTrial> trial_; | 99 scoped_refptr<base::FieldTrial> trial_; |
99 | 100 |
100 DISALLOW_COPY_AND_ASSIGN(PredictorInit); | 101 DISALLOW_COPY_AND_ASSIGN(PredictorInit); |
101 }; | 102 }; |
102 | 103 |
103 } // namespace chrome_browser_net | 104 } // namespace chrome_browser_net |
104 | 105 |
105 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ | 106 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ |
OLD | NEW |