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

Unified Diff: chrome/browser/sync/test/integration/search_engines_helper.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/sync/test/integration/search_engines_helper.cc
diff --git a/chrome/browser/sync/test/integration/search_engines_helper.cc b/chrome/browser/sync/test/integration/search_engines_helper.cc
index 320b2a666973f2430d20f530b5d351a40cbd1c9a..1061133a2b092b761fe6d4958e3303643057e98a 100644
--- a/chrome/browser/sync/test/integration/search_engines_helper.cc
+++ b/chrome/browser/sync/test/integration/search_engines_helper.cc
@@ -8,6 +8,7 @@
#include <vector>
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -186,24 +187,26 @@ bool AllServicesMatch() {
return true;
}
-TemplateURL* CreateTestTemplateURL(Profile* profile, int seed) {
+std::unique_ptr<TemplateURL> CreateTestTemplateURL(Profile* profile, int seed) {
return CreateTestTemplateURL(profile, seed, CreateKeyword(seed),
base::StringPrintf("0000-0000-0000-%04d", seed));
}
-TemplateURL* CreateTestTemplateURL(Profile* profile,
- int seed,
- const base::string16& keyword,
- const std::string& sync_guid) {
+std::unique_ptr<TemplateURL> CreateTestTemplateURL(
+ Profile* profile,
+ int seed,
+ const base::string16& keyword,
+ const std::string& sync_guid) {
return CreateTestTemplateURL(profile, seed, keyword,
base::StringPrintf("http://www.test%d.com/", seed), sync_guid);
}
-TemplateURL* CreateTestTemplateURL(Profile* profile,
- int seed,
- const base::string16& keyword,
- const std::string& url,
- const std::string& sync_guid) {
+std::unique_ptr<TemplateURL> CreateTestTemplateURL(
+ Profile* profile,
+ int seed,
+ const base::string16& keyword,
+ const std::string& url,
+ const std::string& sync_guid) {
TemplateURLData data;
data.SetShortName(CreateKeyword(seed));
data.SetKeyword(keyword);
@@ -214,7 +217,7 @@ TemplateURL* CreateTestTemplateURL(Profile* profile,
data.last_modified = base::Time::FromTimeT(100);
data.prepopulate_id = 999999;
data.sync_guid = sync_guid;
- return new TemplateURL(data);
+ return base::MakeUnique<TemplateURL>(data);
}
void AddSearchEngine(int profile_index, int seed) {

Powered by Google App Engine
This is Rietveld 408576698