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

Unified Diff: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc

Issue 2223073002: Add per-section clearing and dismissed suggestions to snippets-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-Debug builds 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
« no previous file with comments | « components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
diff --git a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
index 2d262ec711ebf1b1a5eb978889aac741b2856c93..12914ea57d9b5ffb4a5ab0cf922c72332550e861 100644
--- a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
@@ -49,6 +49,7 @@ std::vector<Category> OfflinePageSuggestionsProvider::GetProvidedCategories() {
CategoryStatus OfflinePageSuggestionsProvider::GetCategoryStatus(
Category category) {
+ DCHECK_EQ(category, provided_category_);
return category_status_;
}
@@ -67,11 +68,23 @@ void OfflinePageSuggestionsProvider::FetchSuggestionImage(
FROM_HERE, base::Bind(callback, suggestion_id, gfx::Image()));
}
-void OfflinePageSuggestionsProvider::ClearCachedSuggestionsForDebugging() {
+void OfflinePageSuggestionsProvider::ClearCachedSuggestionsForDebugging(
+ Category category) {
+ DCHECK_EQ(category, provided_category_);
// Ignored.
}
-void OfflinePageSuggestionsProvider::ClearDismissedSuggestionsForDebugging() {
+std::vector<ContentSuggestion>
+OfflinePageSuggestionsProvider::GetDismissedSuggestionsForDebugging(
+ Category category) {
+ DCHECK_EQ(category, provided_category_);
+ // TODO(pke): Implement when dismissed suggestions are supported.
+ return std::vector<ContentSuggestion>();
+}
+
+void OfflinePageSuggestionsProvider::ClearDismissedSuggestionsForDebugging(
+ Category category) {
+ DCHECK_EQ(category, provided_category_);
// TODO(pke): Implement when dismissed suggestions are supported.
}
« no previous file with comments | « components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698