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

Unified Diff: chrome/browser/ui/search_engines/edit_search_engine_controller.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: rebase 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/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_),
Peter Kasting 2016/09/01 08:21:39 Urgh, apparently sometimes this class owns this ra
Avi (use Gerrit) 2016/09/01 15:14:47 Yep, this is super sloppy. I'm going to pass since
Peter Kasting 2016/09/01 20:25:05 Filed https://bugs.chromium.org/p/chromium/issues/
+ title_input, keyword_input,
+ url_string);
content::RecordAction(UserMetricsAction("KeywordEditor_AddKeywordJS"));
} else {
// Adding or modifying an entry via the Delegate.

Powered by Google App Engine
This is Rietveld 408576698