| 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 0ba1efb611d99b8eff305813c9f85b89753ee114..39e8dc8c8c052f1bf189278bcf188acf87fda569 100644
|
| --- a/components/ntp_snippets/ntp_snippets_service.h
|
| +++ b/components/ntp_snippets/ntp_snippets_service.h
|
| @@ -75,11 +75,29 @@ class NTPSnippetsService : public KeyedService {
|
|
|
| // Fetches snippets from the server and adds them to the current ones.
|
| void FetchSnippets();
|
| + // Fetches snippets from the server for specified hosts (overriding
|
| + // suggestions from the suggestion service) and adds them to the current ones.
|
| + void FetchSnippetsFromHosts(const std::set<std::string>& hosts);
|
| +
|
| + // Deletes all currently stored snippets.
|
| + void ClearSnippets();
|
|
|
| // Discards the snippet with the given |url|, if it exists. Returns true iff
|
| // a snippet was discarded.
|
| bool DiscardSnippet(const GURL& url);
|
|
|
| + // Returns the lists of snippets previously discarded by the user (that are
|
| + // not expired yet).
|
| + const NTPSnippetStorage& discarded_snippets() const {
|
| + return discarded_snippets_;
|
| + }
|
| +
|
| + // Clears the lists of snippets previously discarded by the user.
|
| + void ClearDiscardedSnippets();
|
| +
|
| + // Returns the lists of suggestion hosts the snippets are restricted to.
|
| + std::set<std::string> GetSuggestionsHosts() const;
|
| +
|
| // Observer accessors.
|
| void AddObserver(NTPSnippetsServiceObserver* observer);
|
| void RemoveObserver(NTPSnippetsServiceObserver* observer);
|
| @@ -107,8 +125,6 @@ class NTPSnippetsService : public KeyedService {
|
| scoped_ptr<base::Value> parsed);
|
| void OnJsonError(const std::string& snippets_json, const std::string& error);
|
|
|
| - void FetchSnippetsImpl(const std::set<std::string>& hosts);
|
| -
|
| // Expects a top-level dictionary containing a "recos" list, which will be
|
| // passed to LoadFromListValue().
|
| bool LoadFromValue(const base::Value& value);
|
|
|