Chromium Code Reviews| 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(); |