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

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: Fix typo. 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..bb0868330978dfdaca4f6e8c1c894a347d27f4a1
--- /dev/null
+++ b/chrome/browser/net/prediction_helper.h
@@ -0,0 +1,38 @@
+// Copyright 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).
mmenke 2014/06/26 20:41:01 nit: Maybe "... this polls the current network st
Bence 2014/06/27 15:11:50 Done.
+//
+// See https://crbug.com/334602 for more details.
mmenke 2014/06/26 20:41:01 I'm not sure the bug is interesting enough to link
mmenke 2014/06/26 20:41:01 Move comments to before function definitions (Mayb
Bence 2014/06/27 15:11:50 Done.
Bence 2014/06/27 15:11:50 Done.
+
+#ifndef CHROME_BROWSER_NET_PREDICTION_HELPER_H_
+#define CHROME_BROWSER_NET_PREDICTION_HELPER_H_
mmenke 2014/06/26 20:41:01 Unless you have plans to add other stuff to this f
Bence 2014/06/27 15:11:50 I do not have such plans. Let's discuss it.
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+} // user_prefs
+
+namespace content {
+class ResourceContext;
+} // namespace content
+
+class PrefService;
+
+namespace chrome_browser_net {
mmenke 2014/06/26 20:41:01 Using the chrome_browser_net namespace has fallen
Bence 2014/06/27 15:11:50 Sure. What namespace do you recommend for these t
+
+void RegisterPredictionHelperProfilePrefs(
mmenke 2014/06/27 16:26:29 OH, this should be renamed, too, using our new fav
Bence 2014/06/27 18:26:44 Well, this is where a unique namespace would be ni
+ 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