OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 class PrefService; | 27 class PrefService; |
28 | 28 |
29 namespace chrome_browser_net { | 29 namespace chrome_browser_net { |
30 | 30 |
31 // Deletes |referral_list| when done. | 31 // Deletes |referral_list| when done. |
32 void FinalizePredictorInitialization( | 32 void FinalizePredictorInitialization( |
33 Predictor* global_predictor, | 33 Predictor* global_predictor, |
34 const std::vector<GURL>& urls_to_prefetch, | 34 const std::vector<GURL>& urls_to_prefetch, |
35 ListValue* referral_list); | 35 base::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 DiscardInitialNavigationHistory(); | 44 void DiscardInitialNavigationHistory(); |
45 void RegisterUserPrefs(PrefService* user_prefs); | 45 void RegisterUserPrefs(PrefService* user_prefs); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 private: | 100 private: |
101 // Maintain a field trial instance when we do A/B testing. | 101 // Maintain a field trial instance when we do A/B testing. |
102 scoped_refptr<base::FieldTrial> trial_; | 102 scoped_refptr<base::FieldTrial> trial_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(PredictorInit); | 104 DISALLOW_COPY_AND_ASSIGN(PredictorInit); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace chrome_browser_net | 107 } // namespace chrome_browser_net |
108 | 108 |
109 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ | 109 #endif // CHROME_BROWSER_NET_PREDICTOR_API_H_ |
OLD | NEW |