| Index: components/ntp_snippets/ntp_snippets_service.h
|
| diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
|
| index c7a32443301e976c088ec1dc7dbb7945e3267879..3a32b89af7474edca8672cfa49ef96bf9ede0d1d 100644
|
| --- a/components/ntp_snippets/ntp_snippets_service.h
|
| +++ b/components/ntp_snippets/ntp_snippets_service.h
|
| @@ -90,7 +90,12 @@ class NTPSnippetsService : public KeyedService {
|
| // a snippet was discarded.
|
| bool DiscardSnippet(const GURL& url);
|
|
|
| - // Returns the lists of snippets previously discarded by the user (that are
|
| + // Returns the list of current valid snippets.
|
| + const NTPSnippetStorage& snippets() const {
|
| + return snippets_;
|
| + }
|
| +
|
| + // Returns the list of snippets previously discarded by the user (that are
|
| // not expired yet).
|
| const NTPSnippetStorage& discarded_snippets() const {
|
| return discarded_snippets_;
|
| @@ -102,6 +107,10 @@ class NTPSnippetsService : public KeyedService {
|
| // Returns the lists of suggestion hosts the snippets are restricted to.
|
| std::set<std::string> GetSuggestionsHosts() const;
|
|
|
| + // Returns the given snippets as a list value.
|
| + scoped_ptr<base::ListValue> SnippetsToListValue(
|
| + const NTPSnippetsService::NTPSnippetStorage& snippets) const;
|
| +
|
| // Observer accessors.
|
| void AddObserver(NTPSnippetsServiceObserver* observer);
|
| void RemoveObserver(NTPSnippetsServiceObserver* observer);
|
|
|