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

Unified Diff: components/ntp_snippets/pref_names.h

Issue 2922543002: [NTP::Push] Add Content Suggestions GCM App Handler (Closed)
Patch Set: Add missing dependency. Created 3 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
Index: components/ntp_snippets/pref_names.h
diff --git a/components/ntp_snippets/pref_names.h b/components/ntp_snippets/pref_names.h
index c640965e9ee1aedf499cd58d65fa999ea16ed2a7..8dac4cdff3747012617c3b3b6a11682b1977ecbc 100644
--- a/components/ntp_snippets/pref_names.h
+++ b/components/ntp_snippets/pref_names.h
@@ -90,9 +90,23 @@ extern const char kClickBasedCategoryRankerOrderWithClicks[];
// The pref name for the time when last click decay has happened.
extern const char kClickBasedCategoryRankerLastDecayTime[];
-// The pref name for the subscription token used when subscription for breaking
-// news push updates,
+// kContentSuggestionsSubscriptionData* hold the data used when subscribing for
+// content suggestions via GCM push updates. They are stored in pref such that
+// in case of change (e.g. the token renders invalid), re-subscription is
+// required.
+///////////////////////////////////////////////////////////////////////////////
+// The pref name for the subscription token used when subscription for
+// breaking news push updates.
extern const char kContentSuggestionsSubscriptionDataToken[];
+//////////////////////// End of kContentSuggestionsSubscriptionData *
+
+// The pref name for the subscription token received from the gcm server. As
+// recommended by the GCM team, it is cached in pref for faster bookkeeping to
+// see if subscription exists. This is pref holds the valid token even if
+// different from the one used for subscription. When they are different, Chrome
+// unsubscribes the old token from the content suggestions server, subscribe
+// with the new one and update kContentSuggestionsSubscriptionDataToken.
+extern const char kContentSuggestionsGCMSubscriptionTokenCache[];
} // namespace prefs
} // namespace ntp_snippets
« no previous file with comments | « components/ntp_snippets/breaking_news/subscription_manager_unittest.cc ('k') | components/ntp_snippets/pref_names.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698