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

Unified Diff: components/omnibox/browser/scored_history_match_unittest.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: components/omnibox/browser/scored_history_match_unittest.cc
diff --git a/components/omnibox/browser/scored_history_match_unittest.cc b/components/omnibox/browser/scored_history_match_unittest.cc
index a382a5470bade3acc7f65121fdda26bf5452739c..d1d3c2e5a729270bd5f94985ba6393aba968ad30 100644
--- a/components/omnibox/browser/scored_history_match_unittest.cc
+++ b/components/omnibox/browser/scored_history_match_unittest.cc
@@ -312,8 +312,10 @@ TEST_F(ScoredHistoryMatchTest, CullSearchResults) {
data.SetShortName(ASCIIToUTF16("TestEngine"));
data.SetKeyword(ASCIIToUTF16("TestEngine"));
data.SetURL("http://testsearch.com/{searchTerms}");
- TemplateURL* template_url = new TemplateURL(data);
- 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:56 Nit: Just use the old code and add a WrapUnique()
Avi (use Gerrit) 2016/09/01 00:34:26 Done.
template_url_service->SetUserSelectedDefaultSearchProvider(template_url);
template_url_service->Load();

Powered by Google App Engine
This is Rietveld 408576698