OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ | 5 #ifndef CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ |
6 #define CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ | 6 #define CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ |
7 | 7 |
8 namespace user_prefs { | 8 namespace user_prefs { |
9 class PrefRegistrySyncable; | 9 class PrefRegistrySyncable; |
10 } | 10 } |
11 | 11 |
12 class PrefService; | 12 class PrefService; |
13 class ProfileIOData; | 13 class ProfileIOData; |
14 | 14 |
15 namespace chrome_browser_net { | 15 namespace chrome_browser_net { |
16 | 16 |
17 // Enum describing when to allow network predictions based on connection type. | 17 // Enum describing when to allow network predictions based on connection type. |
18 // The numerical value is stored in the prefs file, therefore the same enum | 18 // The numerical value is stored in the prefs file, therefore the same enum |
19 // with the same order must be used by the platform-dependent components. | 19 // with the same order must be used by the platform-dependent components. |
20 enum NetworkPredictionOptions { | 20 enum NetworkPredictionOptions { |
| 21 // TODO(newt): collapse ALWAYS and WIFI_ONLY into a single value. See |
| 22 // crbug.com/585297 |
21 NETWORK_PREDICTION_ALWAYS, | 23 NETWORK_PREDICTION_ALWAYS, |
22 NETWORK_PREDICTION_WIFI_ONLY, | 24 NETWORK_PREDICTION_WIFI_ONLY, |
23 NETWORK_PREDICTION_NEVER, | 25 NETWORK_PREDICTION_NEVER, |
24 NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY, | 26 NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY, |
25 }; | 27 }; |
26 | 28 |
27 enum class NetworkPredictionStatus { | 29 enum class NetworkPredictionStatus { |
28 ENABLED, | 30 ENABLED, |
29 DISABLED_ALWAYS, | 31 DISABLED_ALWAYS, |
30 DISABLED_DUE_TO_NETWORK, | 32 DISABLED_DUE_TO_NETWORK, |
(...skipping 17 matching lines...) Expand all Loading... |
48 | 50 |
49 // To be executed on the IO thread only. | 51 // To be executed on the IO thread only. |
50 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data); | 52 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data); |
51 | 53 |
52 // To be executed on the UI thread only. | 54 // To be executed on the UI thread only. |
53 bool CanPreresolveAndPreconnectUI(PrefService* prefs); | 55 bool CanPreresolveAndPreconnectUI(PrefService* prefs); |
54 | 56 |
55 } // namespace chrome_browser_net | 57 } // namespace chrome_browser_net |
56 | 58 |
57 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ | 59 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ |
OLD | NEW |