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

Unified Diff: components/ntp_snippets/remote/json_request.cc

Issue 2751093003: Unifies the additional actions for Categories (Closed)
Patch Set: Fix compilation on Android (hopefully) Created 3 years, 9 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/remote/json_request.cc
diff --git a/components/ntp_snippets/remote/json_request.cc b/components/ntp_snippets/remote/json_request.cc
index c561553c985a97bfef762902874abd5e2f4dcb30..3f3125996171fe0439f049125a1881e9a1f29ec4 100644
--- a/components/ntp_snippets/remote/json_request.cc
+++ b/components/ntp_snippets/remote/json_request.cc
@@ -132,32 +132,6 @@ std::string GetUserClassString(UserClassifier::UserClass user_class) {
} // namespace
-CategoryInfo BuildArticleCategoryInfo(
- const base::Optional<base::string16>& title) {
- return CategoryInfo(
- title.has_value() ? title.value()
- : l10n_util::GetStringUTF16(
- IDS_NTP_ARTICLE_SUGGESTIONS_SECTION_HEADER),
- ContentSuggestionsCardLayout::FULL_CARD,
- /*has_fetch_action=*/true,
- /*has_view_all_action=*/false,
- /*show_if_empty=*/true,
- l10n_util::GetStringUTF16(IDS_NTP_ARTICLE_SUGGESTIONS_SECTION_EMPTY));
-}
-
-CategoryInfo BuildRemoteCategoryInfo(const base::string16& title,
- bool allow_fetching_more_results) {
- return CategoryInfo(
- title, ContentSuggestionsCardLayout::FULL_CARD,
- /*has_fetch_action=*/allow_fetching_more_results,
- /*has_view_all_action=*/false,
- /*show_if_empty=*/false,
- // TODO(tschumann): The message for no-articles is likely wrong
- // and needs to be added to the stubby protocol if we want to
- // support it.
- l10n_util::GetStringUTF16(IDS_NTP_ARTICLE_SUGGESTIONS_SECTION_EMPTY));
-}
-
JsonRequest::JsonRequest(
base::Optional<Category> exclusive_category,
base::Clock* clock, // Needed until destruction of the request.

Powered by Google App Engine
This is Rietveld 408576698