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

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

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: fix broken test Created 4 years, 3 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_service_unittest.cc
diff --git a/chrome/browser/search/instant_service_unittest.cc b/chrome/browser/search/instant_service_unittest.cc
index bab485bbecab5744ecf7f1d8c331d49879a1afcf..340a1939d2e9f32510036bb3a701fb34d4a95498 100644
--- a/chrome/browser/search/instant_service_unittest.cc
+++ b/chrome/browser/search/instant_service_unittest.cc
@@ -9,6 +9,7 @@
#include <tuple>
#include <vector>
+#include "base/memory/ptr_util.h"
#include "base/metrics/field_trial.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -131,9 +132,8 @@ TEST_F(InstantServiceEnabledTest,
TemplateURLData data;
data.SetShortName(base::ASCIIToUTF16("foobar.com"));
data.SetURL("https://foobar.com/url?bar={searchTerms}");
- TemplateURL* template_url = new TemplateURL(data);
- // Takes ownership of |template_url|.
- template_url_service_->Add(template_url);
+ TemplateURL* template_url =
+ template_url_service_->Add(base::MakeUnique<TemplateURL>(data));
template_url_service_->SetUserSelectedDefaultSearchProvider(template_url);
EXPECT_EQ(static_cast<InstantSearchPrerenderer*>(NULL),

Powered by Google App Engine
This is Rietveld 408576698