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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 2225753003: Revert of Add per-section clearing and dismissed suggestions to snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
index 741dbfe49bab276b66f83db1383271e93552d546..de27dacdae614e0528620c4487b5e2b37f2a2cb8 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -109,6 +109,15 @@
void FetchSnippetsFromHosts(const std::set<std::string>& hosts,
bool force_request);
+ // Available snippets.
+ const NTPSnippet::PtrVector& snippets() const { return snippets_; }
+
+ // Returns the list of snippets previously dismissed by the user (that are
+ // not expired yet).
+ const NTPSnippet::PtrVector& dismissed_snippets() const {
+ return dismissed_snippets_;
+ }
+
const NTPSnippetsFetcher* snippets_fetcher() const {
return snippets_fetcher_.get();
}
@@ -124,26 +133,21 @@
void RescheduleFetching();
// ContentSuggestionsProvider implementation
+ // TODO(pke): At some point reorder the implementations in the .cc file
+ // accordingly.
std::vector<Category> GetProvidedCategories() override;
CategoryStatus GetCategoryStatus(Category category) override;
void DismissSuggestion(const std::string& suggestion_id) override;
void FetchSuggestionImage(const std::string& suggestion_id,
const ImageFetchedCallback& callback) override;
- void ClearCachedSuggestionsForDebugging(Category category) override;
- std::vector<ContentSuggestion> GetDismissedSuggestionsForDebugging(
- Category category) override;
- void ClearDismissedSuggestionsForDebugging(Category category) override;
+ void ClearCachedSuggestionsForDebugging() override;
+ void ClearDismissedSuggestionsForDebugging() override;
// Returns the lists of suggestion hosts the snippets are restricted to.
std::set<std::string> GetSuggestionsHosts() const;
// Returns the maximum number of snippets that will be shown at once.
static int GetMaxSnippetCountForTesting();
-
- // Available snippets, only for unit tests.
- const NTPSnippet::PtrVector& GetSnippetsForTesting() const {
- return snippets_;
- }
private:
friend class NTPSnippetsServiceTest;
« no previous file with comments | « components/ntp_snippets/content_suggestions_service_unittest.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698