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

Unified Diff: chrome/browser/net/prediction_helper.h

Issue 357723003: Implement prediction_options. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/prediction_helper.cc » ('j') | chrome/browser/net/prediction_helper.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/net/prediction_helper.cc » ('j') | chrome/browser/net/prediction_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698