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

Unified Diff: components/ntp_snippets/ntp_snippets_service.cc

Issue 2232783002: Support action button to fetch more content suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippetsbridge
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.cc
diff --git a/components/ntp_snippets/ntp_snippets_service.cc b/components/ntp_snippets/ntp_snippets_service.cc
index 295acfbcd20c73bdc72e2300baca2449e4add84a..c83e2f11f19b8ce580b9aec8395be889584c78b5 100644
--- a/components/ntp_snippets/ntp_snippets_service.cc
+++ b/components/ntp_snippets/ntp_snippets_service.cc
@@ -284,7 +284,14 @@ CategoryStatus NTPSnippetsService::GetCategoryStatus(Category category) {
CategoryInfo NTPSnippetsService::GetCategoryInfo(Category category) {
return CategoryInfo(
l10n_util::GetStringUTF16(IDS_NTP_ARTICLE_SUGGESTIONS_SECTION_HEADER),
- ContentSuggestionsCardLayout::FULL_CARD);
+ ContentSuggestionsCardLayout::FULL_CARD, false);
+}
+
+void NTPSnippetsService::FetchMoreSuggestions(Category category) {
+ // TODO(pke): Move implementation of FetchSnippets down here once the separate
+ // FetchSnippets is not needed by snippets internals anymore, which will
+ // happen once we don't need host restricts anymore.
+ FetchSnippets(true);
}
void NTPSnippetsService::DismissSuggestion(const std::string& suggestion_id) {

Powered by Google App Engine
This is Rietveld 408576698