OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_ | |
6 #define COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_ | |
7 | |
8 #include <set> | |
9 #include <string> | |
10 | |
11 class PrefService; | |
12 | |
13 namespace ntp_snippets { | |
14 namespace prefs { | |
15 | |
16 // Reads a given preference and then deserializes it into a set of strings. | |
17 std::set<std::string> ReadDismissedIDsFromPrefs(const PrefService& pref_service, | |
battre
2016/09/19 08:54:34
nit: I think that in the majority of cases, we pas
tschumann
2016/09/19 12:19:23
If nullptr is not allowed and a method does not ke
skym
2016/09/19 18:54:47
Acknowledged.
| |
18 const std::string& pref_name); | |
19 | |
20 // Serializes a set of strings into a given preference. | |
21 void StoreDismissedIDsToPrefs(PrefService* pref_service, | |
22 const std::string& pref_name, | |
23 const std::set<std::string>& dismissed_ids); | |
24 | |
25 } // namespace prefs | |
26 } // namespace ntp_snippets | |
27 | |
28 #endif // COMPONENTS_NTP_SNIPPETS_PREF_UTIL_H_ | |
OLD | NEW |