Chromium Code Reviews| 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 0c8629540328d73f41b5a5d21af1e3cbdb901e48..342b244510a76ec5b7a1b85766007c5c5d18ef95 100644 |
| --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| @@ -137,16 +137,16 @@ void NTPSnippetsBridge::NTPSnippetsServiceLoaded() { |
| std::vector<std::string> snippets; |
| std::vector<int64_t> timestamps; |
| std::vector<std::string> publishers; |
| - for (const ntp_snippets::NTPSnippet& snippet : *ntp_snippets_service_) { |
| + for (const auto& snippet : ntp_snippets_service_->snippets()) { |
|
Bernhard Bauer
2016/05/10 14:48:56
Could you keep the original type? I find it's much
mastiz
2016/05/10 15:59:52
Done.
|
| // The url from source_info is a url for a site that is one of the |
| // HOST_RESTRICT parameters, so this is preferred. |
| - urls.push_back(snippet.best_source().url.spec()); |
| - amp_urls.push_back(snippet.best_source().amp_url.spec()); |
| - titles.push_back(snippet.title()); |
| - thumbnail_urls.push_back(snippet.salient_image_url().spec()); |
| - snippets.push_back(snippet.snippet()); |
| - timestamps.push_back(snippet.publish_date().ToJavaTime()); |
| - publishers.push_back(snippet.best_source().publisher_name); |
| + urls.push_back(snippet->best_source().url.spec()); |
| + amp_urls.push_back(snippet->best_source().amp_url.spec()); |
| + titles.push_back(snippet->title()); |
| + thumbnail_urls.push_back(snippet->salient_image_url().spec()); |
| + snippets.push_back(snippet->snippet()); |
| + timestamps.push_back(snippet->publish_date().ToJavaTime()); |
| + publishers.push_back(snippet->best_source().publisher_name); |
| } |
| JNIEnv* env = base::android::AttachCurrentThread(); |