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

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

Issue 1921933004: More consistency in m_v_s_bridge.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Protected destructor Created 4 years, 8 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 | « chrome/browser/android/ntp/most_visited_sites.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/most_visited_sites_bridge.cc
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
index 19cc7b3aace9b61be8f2babc55b8b8fa9261db2d..44b5a62f8f69c1e797e39cbfc366fbeeda36d855 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -69,10 +69,11 @@ void MostVisitedSitesBridge::Observer::OnMostVisitedURLsAvailable(
std::vector<std::string> whitelist_icon_paths;
titles.reserve(suggestions.size());
urls.reserve(suggestions.size());
+ whitelist_icon_paths.reserve(suggestions.size());
for (const auto& suggestion : suggestions) {
- titles.push_back(suggestion.title);
- urls.push_back(suggestion.url.spec());
- whitelist_icon_paths.push_back(suggestion.whitelist_icon_path.value());
+ titles.emplace_back(suggestion.title);
+ urls.emplace_back(suggestion.url.spec());
+ whitelist_icon_paths.emplace_back(suggestion.whitelist_icon_path.value());
}
Java_MostVisitedURLsObserver_onMostVisitedURLsAvailable(
env, observer_.obj(), ToJavaArrayOfStrings(env, titles).obj(),
« no previous file with comments | « chrome/browser/android/ntp/most_visited_sites.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698