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

Unified Diff: components/ntp_snippets/pref_names.h

Issue 2279123002: [Sync] Initial implementation of foreign sessions suggestions provider. (Closed)
Patch Set: Remove foreign sessions suggestions when user disabled session data syncing. Created 4 years, 4 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 8153cac627e42ebeb1f7345a7f00e3a2f33b5823..96acdaa9441707a2cb94cce2554147f478ae1d97 100644
--- a/components/ntp_snippets/pref_names.h
+++ b/components/ntp_snippets/pref_names.h
@@ -5,6 +5,11 @@
#ifndef COMPONENTS_NTP_SNIPPETS_PREF_NAMES_H_
#define COMPONENTS_NTP_SNIPPETS_PREF_NAMES_H_
+#include <set>
+#include <string>
+
+class PrefService;
+
namespace ntp_snippets {
namespace prefs {
@@ -31,10 +36,18 @@ extern const char kSnippetThumbnailsRequestsDay[];
extern const char kDismissedRecentOfflineTabSuggestions[];
extern const char kDismissedDownloadSuggestions[];
+extern const char kDismissedForeignSessionsSuggestions[];
// The pref name for the time when M54 was first started on the device.
extern const char kBookmarksFirstM54Start[];
+std::set<std::string> ReadDismissedIDsFromPrefs(const std::string& pref_name,
+ PrefService* pref_service);
Marc Treib 2016/08/29 09:18:50 nit: const nit²: Should |pref_service| be the firs
tschumann 2016/08/29 09:39:15 yeah, let's make |pref_service| a const reference
battre 2016/08/29 09:48:26 Do these functions belong into pref_names.h?
skym 2016/09/15 23:18:17 Done. Done.
skym 2016/09/15 23:18:17 Moved to their own file.
skym 2016/09/15 23:18:17 Done.
+
+void StoreDismissedIDsToPrefs(const std::string& pref_name,
+ const std::set<std::string>& dismissed_ids,
+ PrefService* pref_service);
+
} // namespace prefs
} // namespace ntp_snippets

Powered by Google App Engine
This is Rietveld 408576698