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

Unified Diff: components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc

Issue 2447163004: [NTP Snippets] Pass "no suggestions" message from the backend to the UI (Closed)
Patch Set: tests Created 4 years, 2 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/sessions/foreign_sessions_suggestions_provider.cc
diff --git a/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc b/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc
index f913d660fcaea61e10e56db31922492300e386bc..384352ebf4f18275ffb5424230d0a2677834b318 100644
--- a/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc
+++ b/components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.cc
@@ -117,11 +117,15 @@ CategoryStatus ForeignSessionsSuggestionsProvider::GetCategoryStatus(
CategoryInfo ForeignSessionsSuggestionsProvider::GetCategoryInfo(
Category category) {
DCHECK_EQ(category, provided_category_);
- return CategoryInfo(l10n_util::GetStringUTF16(
- IDS_NTP_FOREIGN_SESSIONS_SUGGESTIONS_SECTION_HEADER),
- ContentSuggestionsCardLayout::MINIMAL_CARD,
- /*has_more_button=*/true,
- /*show_if_empty=*/false);
+ return CategoryInfo(
+ l10n_util::GetStringUTF16(
+ IDS_NTP_FOREIGN_SESSIONS_SUGGESTIONS_SECTION_HEADER),
+ ContentSuggestionsCardLayout::MINIMAL_CARD,
+ /*has_more_button=*/true,
+ /*show_if_empty=*/false,
+ l10n_util::GetStringUTF16(IDS_NTP_SUGGESTIONS_SECTION_EMPTY));
+ // TODO(skym): Replace IDS_NTP_SUGGESTIONS_SECTION_EMPTY with a
+ // category-specific string.
}
void ForeignSessionsSuggestionsProvider::DismissSuggestion(

Powered by Google App Engine
This is Rietveld 408576698