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

Unified Diff: components/search_engines/search_host_to_urls_map.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: rebase Created 4 years, 4 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/search_engines/search_host_to_urls_map.cc
diff --git a/components/search_engines/search_host_to_urls_map.cc b/components/search_engines/search_host_to_urls_map.cc
index d10f62b2def13613d74d096ae52dad396e2b4068..2fed951c97d3788dd31ada9b1d623214d0faa155 100644
--- a/components/search_engines/search_host_to_urls_map.cc
+++ b/components/search_engines/search_host_to_urls_map.cc
@@ -16,7 +16,7 @@ SearchHostToURLsMap::~SearchHostToURLsMap() {
}
void SearchHostToURLsMap::Init(
- const TemplateURLService::TemplateURLVector& template_urls,
+ const TemplateURLService::OwnedTemplateURLVector& template_urls,
const SearchTermsData& search_terms_data) {
DCHECK(!initialized_);
initialized_ = true; // Set here so Add doesn't assert.
@@ -76,9 +76,8 @@ SearchHostToURLsMap::TemplateURLSet* SearchHostToURLsMap::GetURLsForHost(
}
void SearchHostToURLsMap::Add(
- const TemplateURLService::TemplateURLVector& template_urls,
+ const TemplateURLService::OwnedTemplateURLVector& template_urls,
const SearchTermsData& search_terms_data) {
- for (TemplateURLService::TemplateURLVector::const_iterator i(
- template_urls.begin()); i != template_urls.end(); ++i)
- Add(*i, search_terms_data);
+ for (const auto& turl : template_urls)
+ Add(turl.get(), search_terms_data);
}

Powered by Google App Engine
This is Rietveld 408576698