Chromium Code Reviews| Index: chrome/browser/net/prediction_helper.h |
| diff --git a/chrome/browser/net/prediction_helper.h b/chrome/browser/net/prediction_helper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..06e47b148e1e4fba44d480a3cc45442aec7f7219 |
| --- /dev/null |
| +++ b/chrome/browser/net/prediction_helper.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// These two global functions determine whether predictive network actions |
| +// are enabled, based on preferences and network type. Since both |
| +// preference lookup and network connection checking are presumably cheap, |
| +// this is implemented on a polling basis (as opposed to observers). |
| +// |
| +// See https://crbug.com/334602 for more details. |
| + |
| +#ifndef CHROME_BROWSER_NET_PREDICTION_HELPER_H_ |
| +#define CHROME_BROWSER_NET_PREDICTION_HELPER_H_ |
| + |
| +namespace user_prefs { |
| +class PrefRegistrySyncable; |
| +} |
|
jkarlin
2014/06/26 16:28:52
// namespace user_prefs
Bence
2014/06/26 20:02:06
Done.
|
| + |
| +namespace content { |
| +class ResourceContext; |
| +} |
|
jkarlin
2014/06/26 16:28:52
// namespace content
Bence
2014/06/26 20:02:06
Done.
|
| + |
| +class PrefService; |
| + |
| +namespace chrome_browser_net { |
| + |
| +void RegisterPredictionHelperProfilePrefs( |
| + user_prefs::PrefRegistrySyncable* registry); |
| + |
| +// To be executed on the IO thread only. |
| +bool CanPredictNetworkActionsIO(content::ResourceContext* resource_context); |
| + |
| +// To be executed on the UI thread only. |
| +bool CanPredictNetworkActionsUI(PrefService* prefs); |
| + |
| +} // namespace chrome_browser_net |
| + |
| +#endif // CHROME_BROWSER_NET_PREDICTION_HELPER_H_ |