| Index: chrome/browser/ui/search_engines/edit_search_engine_controller.cc
|
| diff --git a/chrome/browser/ui/search_engines/edit_search_engine_controller.cc b/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
|
| index 837c8ea5dee252d59aa34e57727e7697bba6556e..840f5ec304d6082a2d2b3359c3fb8d78ea07bda3 100644
|
| --- a/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
|
| +++ b/chrome/browser/ui/search_engines/edit_search_engine_controller.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/ui/search_engines/edit_search_engine_controller.h"
|
|
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -104,9 +105,9 @@ void EditSearchEngineController::AcceptAddOrEdit(
|
| // Confiming an entry we got from JS. We have a template_url_, but it
|
| // hasn't yet been added to the model.
|
| DCHECK(template_url_);
|
| - // TemplateURLService takes ownership of template_url_.
|
| - template_url_service->AddWithOverrides(template_url_, title_input,
|
| - keyword_input, url_string);
|
| + template_url_service->AddWithOverrides(base::WrapUnique(template_url_),
|
| + title_input, keyword_input,
|
| + url_string);
|
| content::RecordAction(UserMetricsAction("KeywordEditor_AddKeywordJS"));
|
| } else {
|
| // Adding or modifying an entry via the Delegate.
|
|
|