Index: components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc |
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc |
index 777e2a32254203dc78b58159c1def5634bc66d1a..cb248aa047927e6fa65d223db8d2a6d91c061e9d 100644 |
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc |
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc |
@@ -73,18 +73,15 @@ CategoryStatus RecentTabSuggestionsProvider::GetCategoryStatus( |
} |
CategoryInfo RecentTabSuggestionsProvider::GetCategoryInfo(Category category) { |
- if (category == provided_category_) { |
- return CategoryInfo(l10n_util::GetStringUTF16( |
- IDS_NTP_RECENT_TAB_SUGGESTIONS_SECTION_HEADER), |
- ContentSuggestionsCardLayout::MINIMAL_CARD, |
- /*has_more_button=*/false, |
- /*show_if_empty=*/false); |
- } |
- NOTREACHED() << "Unknown category " << category.id(); |
- return CategoryInfo(base::string16(), |
- ContentSuggestionsCardLayout::MINIMAL_CARD, |
- /*has_more_button=*/false, |
- /*show_if_empty=*/false); |
+ DCHECK_EQ(provided_category_, category); |
+ return CategoryInfo( |
+ l10n_util::GetStringUTF16(IDS_NTP_RECENT_TAB_SUGGESTIONS_SECTION_HEADER), |
+ ContentSuggestionsCardLayout::MINIMAL_CARD, |
+ /*has_more_button=*/false, |
+ /*show_if_empty=*/false, |
+ l10n_util::GetStringUTF16(IDS_NTP_SUGGESTIONS_SECTION_EMPTY)); |
+ // TODO(vitaliii): Replace IDS_NTP_SUGGESTIONS_SECTION_EMPTY with a |
+ // category-specific string. |
} |
void RecentTabSuggestionsProvider::DismissSuggestion( |