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

Unified Diff: components/ntp_snippets/bookmarks/bookmark_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/bookmarks/bookmark_suggestions_provider.cc
diff --git a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
index 0e27a87cc351150617c2ada15c767a544498bb1d..4edab9e56346afdd5a2bd92b81717e0f0984c68a 100644
--- a/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
+++ b/components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc
@@ -18,6 +18,8 @@
#include "components/ntp_snippets/content_suggestion.h"
#include "components/ntp_snippets/features.h"
#include "components/variations/variations_associated_data.h"
+#include "grit/components_strings.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
using bookmarks::BookmarkModel;
@@ -87,6 +89,12 @@ CategoryStatus BookmarkSuggestionsProvider::GetCategoryStatus(
return category_status_;
}
+CategoryInfo BookmarkSuggestionsProvider::GetCategoryInfo(Category category) {
+ return CategoryInfo(
+ l10n_util::GetStringUTF16(IDS_NTP_BOOKMARK_SUGGESTIONS_SECTION_HEADER),
+ ContentSuggestionsCardLayout::MINIMAL_CARD);
+}
+
void BookmarkSuggestionsProvider::DismissSuggestion(
const std::string& suggestion_id) {
// TODO(jkrcal): Implement blacklisting bookmarks until they are next visited.
« no previous file with comments | « components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h ('k') | components/ntp_snippets/category_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698