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); | |
45 void RegisterUserPrefs(PrefService* user_prefs); | 44 void RegisterUserPrefs(PrefService* user_prefs); |
46 | 45 |
47 // Renderer bundles up list and sends to this browser API via IPC. | 46 // Renderer bundles up list and sends to this browser API via IPC. |
48 // TODO(jar): Use UrlList instead to include port and scheme. | 47 // TODO(jar): Use UrlList instead to include port and scheme. |
49 void DnsPrefetchList(const NameList& hostnames); | 48 void DnsPrefetchList(const NameList& hostnames); |
50 | 49 |
51 // This API is used by the autocomplete popup box (as user types). | 50 // This API is used by the autocomplete popup box (as user types). |
52 // This will either preresolve the domain name, or possibly preconnect creating | 51 // This will either preresolve the domain name, or possibly preconnect creating |
53 // an open TCP/IP connection to the host. | 52 // an open TCP/IP connection to the host. |
54 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); | 53 void AnticipateOmniboxUrl(const GURL& url, bool preconnectable); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 private: | 96 private: |
98 // Maintain a field trial instance when we do A/B testing. | 97 // Maintain a field trial instance when we do A/B testing. |
99 scoped_refptr<base::FieldTrial> trial_; | 98 scoped_refptr<base::FieldTrial> trial_; |
100 | 99 |
101 DISALLOW_COPY_AND_ASSIGN(PredictorInit); | 100 DISALLOW_COPY_AND_ASSIGN(PredictorInit); |
102 }; | 101 }; |
103 | 102 |
104 } // namespace chrome_browser_net | 103 } // namespace chrome_browser_net |
105 | 104 |
106 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ | 105 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ |
OLD | NEW |