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)); |