OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // These two global functions determine whether predictive network actions | |
6 // are enabled, based on preferences and network type. Since both | |
7 // preference lookup and network connection checking are presumably cheap, | |
8 // this is implemented on a polling basis (as opposed to observers). | |
9 // | |
10 // See https://crbug.com/334602 for more details. | |
11 | |
12 #ifndef CHROME_BROWSER_NET_PREDICTION_HELPER_H_ | |
13 #define CHROME_BROWSER_NET_PREDICTION_HELPER_H_ | |
14 | |
15 namespace user_prefs { | |
16 class PrefRegistrySyncable; | |
17 } | |
jkarlin
2014/06/26 16:28:52
// namespace user_prefs
Bence
2014/06/26 20:02:06
Done.
| |
18 | |
19 namespace content { | |
20 class ResourceContext; | |
21 } | |
jkarlin
2014/06/26 16:28:52
// namespace content
Bence
2014/06/26 20:02:06
Done.
| |
22 | |
23 class PrefService; | |
24 | |
25 namespace chrome_browser_net { | |
26 | |
27 void RegisterPredictionHelperProfilePrefs( | |
28 user_prefs::PrefRegistrySyncable* registry); | |
29 | |
30 // To be executed on the IO thread only. | |
31 bool CanPredictNetworkActionsIO(content::ResourceContext* resource_context); | |
32 | |
33 // To be executed on the UI thread only. | |
34 bool CanPredictNetworkActionsUI(PrefService* prefs); | |
35 | |
36 } // namespace chrome_browser_net | |
37 | |
38 #endif // CHROME_BROWSER_NET_PREDICTION_HELPER_H_ | |
OLD | NEW |