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

Unified Diff: components/ntp_snippets/pref_names.h

Issue 2875953003: [Soft fetches] Set-up different intervals for <Chrome started> events. (Closed)
Patch Set: Markus' comments Created 3 years, 7 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
Index: components/ntp_snippets/pref_names.h
diff --git a/components/ntp_snippets/pref_names.h b/components/ntp_snippets/pref_names.h
index 9826eb9e9cab9403d0c73cf79e3080b0370bc27c..3e2d36e96d7cbdc38541cef771038b8fd8bc6d1a 100644
--- a/components/ntp_snippets/pref_names.h
+++ b/components/ntp_snippets/pref_names.h
@@ -18,21 +18,24 @@ extern const char kRemoteSuggestionCategories[];
// The pref name for the last time when a background fetch was attempted.
extern const char kSnippetLastFetchAttempt[];
-// The pref name for the currently applied minimal interval between two
-// successive soft background fetches that react to user activity (such as
-// opening Chrome) when there is a WiFi connectivity.
-extern const char kSnippetSoftFetchingIntervalWifi[];
-// The pref name for the currently applied minimal interval between two
-// successive soft background fetches that react to user activity (such as
-// opening Chrome) when there is no WiFi connectivity.
-extern const char kSnippetSoftFetchingIntervalFallback[];
-
-// The pref name for the currently-scheduled background fetching interval when
-// there is WiFi connectivity.
+
+////////////////// Minimal interval between two successive background fetches.
markusheintz_ 2017/05/16 12:04:57 Comments should be like this: // lalalala ... no
jkrcal 2017/05/16 12:31:01 Done.
+// The pref names for for the currently applied minimal intervals. For each
+// trigger type there are intervals stored in prefs:
+// - "Wifi" for situations with Wifi / unmetered network connectivity, and
+// - "Fallback" for situations with only non-Wifi / metered network.
+// We check "meteredness" of the current network only on platforms that support
+// that, notably Android; we use WiFi as the proxy of being unmetered elsewhere.
+//
+// Intervals for trigger type 1: wake-up of the persistent scheduler.
extern const char kSnippetPersistentFetchingIntervalWifi[];
-// The pref name for the currently-scheduled background fetching interval when
-// there is no WiFi connectivity.
extern const char kSnippetPersistentFetchingIntervalFallback[];
+// Intervals for trigger type 2: browser started-up (both cold and warm start).
+extern const char kSnippetStartupFetchingIntervalWifi[];
+extern const char kSnippetStartupFetchingIntervalFallback[];
+// Intervals for trigger type 3: suggestions shown to the user.
+extern const char kSnippetShownFetchingIntervalWifi[];
+extern const char kSnippetShownFetchingIntervalFallback[];
// The pref name for today's count of RemoteSuggestionsFetcher requests, so far.
extern const char kSnippetFetcherRequestCount[];

Powered by Google App Engine
This is Rietveld 408576698