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

Unified Diff: chrome/browser/ui/search_engines/template_url_table_model.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/ui/search_engines/template_url_table_model.cc
diff --git a/chrome/browser/ui/search_engines/template_url_table_model.cc b/chrome/browser/ui/search_engines/template_url_table_model.cc
index e08544404a5234fcca4e41c57beb047a1bb35897..04246a5a73c6765cfc203f4129eb9f255e86424f 100644
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/i18n/rtl.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/grit/generated_resources.h"
#include "components/favicon/core/favicon_service.h"
@@ -266,8 +267,8 @@ void TemplateURLTableModel::Add(int index,
data.SetShortName(short_name);
data.SetKeyword(keyword);
data.SetURL(url);
- TemplateURL* turl = new TemplateURL(data);
- template_url_service_->Add(turl);
+ TemplateURL* turl =
+ template_url_service_->Add(base::MakeUnique<TemplateURL>(data));
std::unique_ptr<ModelEntry> entry(new ModelEntry(this, turl));
template_url_service_->AddObserver(this);
AddEntry(index, std::move(entry));

Powered by Google App Engine
This is Rietveld 408576698