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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_bridge.cc

Issue 2197223002: Use base::string16 for user-visible texts in ContentSuggestion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/ntp_snippets_bridge.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
index 09d71556ef10d44eed1c251359eeb2f2cbcc759b..aca4af1fd5f6f91659713cf5bd04969af858f998 100644
--- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
@@ -140,16 +140,16 @@ void NTPSnippetsBridge::OnNewSuggestions() {
return;
std::vector<std::string> ids;
- std::vector<std::string> titles;
+ std::vector<base::string16> titles;
// URL for the article. This will also be used to find the favicon for the
// article.
std::vector<std::string> urls;
// URL for the AMP version of the article if it exists. This will be used as
// the URL to direct the user to on tap.
std::vector<std::string> amp_urls;
- std::vector<std::string> snippets;
+ std::vector<base::string16> snippet_texts;
std::vector<int64_t> timestamps;
- std::vector<std::string> publishers;
+ std::vector<base::string16> publisher_names;
std::vector<float> scores;
// Show all suggestions from all categories, even though we currently display
@@ -169,9 +169,9 @@ void NTPSnippetsBridge::OnNewSuggestions() {
// HOST_RESTRICT parameters, so this is preferred.
urls.push_back(suggestion.url().spec());
amp_urls.push_back(suggestion.amp_url().spec());
- snippets.push_back(suggestion.snippet_text());
+ snippet_texts.push_back(suggestion.snippet_text());
timestamps.push_back(suggestion.publish_date().ToJavaTime());
- publishers.push_back(suggestion.publisher_name());
+ publisher_names.push_back(suggestion.publisher_name());
scores.push_back(suggestion.score());
}
}
@@ -182,9 +182,9 @@ void NTPSnippetsBridge::OnNewSuggestions() {
ToJavaArrayOfStrings(env, titles).obj(),
ToJavaArrayOfStrings(env, urls).obj(),
ToJavaArrayOfStrings(env, amp_urls).obj(),
- ToJavaArrayOfStrings(env, snippets).obj(),
+ ToJavaArrayOfStrings(env, snippet_texts).obj(),
ToJavaLongArray(env, timestamps).obj(),
- ToJavaArrayOfStrings(env, publishers).obj(),
+ ToJavaArrayOfStrings(env, publisher_names).obj(),
ToJavaFloatArray(env, scores).obj());
}
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698