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

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

Issue 2207493002: Add CategoryInfo for meta information of content suggestions Categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK against empty base::Optional<CategoryInfo> in SnippetsInternals 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/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 12914ea57d9b5ffb4a5ab0cf922c72332550e861..ee8a25484f9aa172a3904d64b6e5d2d666c62368 100644
--- a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
@@ -53,6 +53,13 @@ CategoryStatus OfflinePageSuggestionsProvider::GetCategoryStatus(
return category_status_;
}
+CategoryInfo OfflinePageSuggestionsProvider::GetCategoryInfo(
+ Category category) {
+ // TODO(pke): Use the proper string once it's agreed on.
+ return CategoryInfo(base::ASCIIToUTF16("Offline pages"),
+ ContentSuggestionsCardLayout::MINIMAL_CARD);
+}
+
void OfflinePageSuggestionsProvider::DismissSuggestion(
const std::string& suggestion_id) {
// TODO(pke): Implement some "dont show on NTP anymore" behaviour,
« no previous file with comments | « components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h ('k') | components/ntp_snippets_strings.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698