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

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

Issue 443413002: Enable TCP preconnect and DNS preresolve on cellular. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix preresolve and preconnect conditions in AnticipateOmniboxUrl. Created 6 years, 4 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
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 }
(...skipping 16 matching lines...) Expand all
27 NETWORK_PREDICTION_UNSET, 27 NETWORK_PREDICTION_UNSET,
28 }; 28 };
29 29
30 void RegisterPredictionOptionsProfilePrefs( 30 void RegisterPredictionOptionsProfilePrefs(
31 user_prefs::PrefRegistrySyncable* registry); 31 user_prefs::PrefRegistrySyncable* registry);
32 32
33 // Migrate prefs::kNetworkPredictionEnabled user setting (if exists) to 33 // Migrate prefs::kNetworkPredictionEnabled user setting (if exists) to
34 // prefs::kNetworkPredictionOptions (if does not have user setting). 34 // prefs::kNetworkPredictionOptions (if does not have user setting).
35 void MigrateNetworkPredictionUserPrefs(PrefService* pref_service); 35 void MigrateNetworkPredictionUserPrefs(PrefService* pref_service);
36 36
37 // The following two global functions determine whether predictive network 37 // The following two global functions determine whether prefetching
38 // actions are enabled, based on preferences and network type. 38 // and prerendering are enabled, based on preferences and network type.
39 39
40 // To be executed on the IO thread only. 40 // To be executed on the IO thread only.
41 bool CanPredictNetworkActionsIO(ProfileIOData* profile_io_data); 41 bool CanPrefetchAndPrerenderIO(ProfileIOData* profile_io_data);
42 42
43 // To be executed on the UI thread only. 43 // To be executed on the UI thread only.
44 bool CanPredictNetworkActionsUI(PrefService* prefs); 44 bool CanPrefetchAndPrerenderUI(PrefService* prefs);
45
46 // The following two global functions determine whether TCP preconnect
47 // and DNS preresolution are enabled, based on preferences.
48
49 // To be executed on the IO thread only.
50 bool CanPreresolveAndPreconnectIO(ProfileIOData* profile_io_data);
51
52 // To be executed on the UI thread only.
53 bool CanPreresolveAndPreconnectUI(PrefService* prefs);
45 54
46 } // namespace chrome_browser_net 55 } // namespace chrome_browser_net
47 56
48 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_ 57 #endif // CHROME_BROWSER_NET_PREDICTION_OPTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/prediction_options.cc » ('j') | chrome/browser/net/predictor.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698