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

Unified Diff: components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc

Issue 2447163004: [NTP Snippets] Pass "no suggestions" message from the backend to the UI (Closed)
Patch Set: fix comment 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/physical_web_pages/physical_web_page_suggestions_provider.cc
diff --git a/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc b/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
index b87f20ed039dd8b6f1ccc0fd813e5b23e660280d..f1f30982be07637a35f3f0591c9538c9f48bf29f 100644
--- a/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
+++ b/components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.cc
@@ -9,6 +9,8 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "grit/components_strings.h"
+#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
namespace ntp_snippets {
@@ -66,11 +68,13 @@ CategoryStatus PhysicalWebPageSuggestionsProvider::GetCategoryStatus(
CategoryInfo PhysicalWebPageSuggestionsProvider::GetCategoryInfo(
Category category) {
- // TODO(vitaliii): Use a proper string once it's been agreed on.
- return CategoryInfo(base::ASCIIToUTF16("Physical web pages"),
- ContentSuggestionsCardLayout::MINIMAL_CARD,
- /* has_more_button */ true,
- /* show_if_empty */ false);
+ // TODO(vitaliii): Use the proper strings once they've been agreed on.
+ return CategoryInfo(
+ base::ASCIIToUTF16("Physical web pages"),
+ ContentSuggestionsCardLayout::MINIMAL_CARD,
+ /* has_more_button */ true,
+ /* show_if_empty */ false,
+ l10n_util::GetStringUTF16(IDS_NTP_SUGGESTIONS_SECTION_EMPTY));
}
void PhysicalWebPageSuggestionsProvider::DismissSuggestion(

Powered by Google App Engine
This is Rietveld 408576698