Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/net/prediction_options.h

Issue 516443002: Remove NETWORK_PREDICTION_UNSET. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/net/prediction_options.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // TODO(bnc): implement as per crbug.com/334602.
21 // NETWORK_PREDICTION_UNSET means that the old preferences,
22 // kNetworkPredictionEnabled and kAllowPrerender, should be observed.
23 enum NetworkPredictionOptions { 20 enum NetworkPredictionOptions {
24 NETWORK_PREDICTION_ALWAYS, 21 NETWORK_PREDICTION_ALWAYS,
25 NETWORK_PREDICTION_WIFI_ONLY, 22 NETWORK_PREDICTION_WIFI_ONLY,
26 NETWORK_PREDICTION_NEVER, 23 NETWORK_PREDICTION_NEVER,
27 NETWORK_PREDICTION_UNSET, 24 NETWORK_PREDICTION_DEFAULT = NETWORK_PREDICTION_WIFI_ONLY,
28 }; 25 };
29 26
30 void RegisterPredictionOptionsProfilePrefs( 27 void RegisterPredictionOptionsProfilePrefs(
31 user_prefs::PrefRegistrySyncable* registry); 28 user_prefs::PrefRegistrySyncable* registry);
32 29
33 // Migrate prefs::kNetworkPredictionEnabled user setting (if exists) to 30 // Migrate prefs::kNetworkPredictionEnabled user setting (if exists) to
34 // prefs::kNetworkPredictionOptions (if does not have user setting). 31 // prefs::kNetworkPredictionOptions (if does not have user setting).
35 void MigrateNetworkPredictionUserPrefs(PrefService* pref_service); 32 void MigrateNetworkPredictionUserPrefs(PrefService* pref_service);
36 33
37 // The following two global functions determine whether prefetching 34 // The following two global functions determine whether prefetching
(...skipping 14 matching lines...) Expand all
52 49
53 // To be executed on the IO thread only. 50 // To be executed on the IO thread only.
54 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data); 51 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data);
55 52
56 // To be executed on the UI thread only. 53 // To be executed on the UI thread only.
57 bool CanPreresolveAndPreconnectUI(PrefService* prefs); 54 bool CanPreresolveAndPreconnectUI(PrefService* prefs);
58 55
59 } // namespace chrome_browser_net 56 } // namespace chrome_browser_net
60 57
61 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ 58 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/prediction_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698