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

Unified Diff: chrome/browser/search/instant_unittest_base.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: ios for reals 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: chrome/browser/search/instant_unittest_base.cc
diff --git a/chrome/browser/search/instant_unittest_base.cc b/chrome/browser/search/instant_unittest_base.cc
index 17cd80dbe224b8d6b4eaa650a74f5adf095ac1f7..df4edfa6a5b2bbe6596a18f73b3e1a695f2e42fb 100644
--- a/chrome/browser/search/instant_unittest_base.cc
+++ b/chrome/browser/search/instant_unittest_base.cc
@@ -60,9 +60,10 @@ void InstantUnitTestBase::SetUserSelectedDefaultSearchProvider(
data.alternate_urls.push_back(base_url + "alt#quux={searchTerms}");
data.search_terms_replacement_key = "strk";
- TemplateURL* template_url = new TemplateURL(data);
- // Takes ownership of |template_url|.
- template_url_service_->Add(template_url);
+ std::unique_ptr<TemplateURL> template_url_ptr =
+ base::MakeUnique<TemplateURL>(data);
+ TemplateURL* template_url = template_url_ptr.get();
+ template_url_service_->Add(std::move(template_url_ptr));
Peter Kasting 2016/08/31 04:12:55 Nit: Just use the old code and add a WrapUnique()
Avi (use Gerrit) 2016/09/01 00:34:25 Fixed.
template_url_service_->SetUserSelectedDefaultSearchProvider(template_url);
}

Powered by Google App Engine
This is Rietveld 408576698