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

Unified Diff: components/ntp_snippets/pref_util.h

Issue 2279123002: [Sync] Initial implementation of foreign sessions suggestions provider. (Closed)
Patch Set: Updating for comments, again! Created 4 years, 3 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 | « components/ntp_snippets/pref_names.cc ('k') | components/ntp_snippets/pref_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/pref_util.h
diff --git a/components/ntp_snippets/pref_util.h b/components/ntp_snippets/pref_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..06ea838bbc5da0e1a2547a0467dff9334d659305
--- /dev/null
+++ b/components/ntp_snippets/pref_util.h
@@ -0,0 +1,28 @@
+// Copyright 2016 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.
+
+#ifndef COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_
+#define COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_
+
+#include <set>
+#include <string>
+
+class PrefService;
+
+namespace ntp_snippets {
+namespace prefs {
+
+// Reads a given preference and then deserializes it into a set of strings.
+std::set<std::string> ReadDismissedIDsFromPrefs(const PrefService& pref_service,
+ const std::string& pref_name);
+
+// Serializes a set of strings into a given preference.
+void StoreDismissedIDsToPrefs(PrefService* pref_service,
+ const std::string& pref_name,
+ const std::set<std::string>& dismissed_ids);
+
+} // namespace prefs
+} // namespace ntp_snippets
+
+#endif // COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_
« no previous file with comments | « components/ntp_snippets/pref_names.cc ('k') | components/ntp_snippets/pref_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698