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

Unified Diff: chrome/browser/ui/webui/settings/search_engines_handler.cc

Issue 2086763002: Don't use deprecated ListValue::Append(Value*) overload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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/webui/settings/search_engines_handler.cc
diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome/browser/ui/webui/settings/search_engines_handler.cc
index 7bf65e92c47869ffb0162aef0fc0b0d0fe7ec71a..36e57332a66284f3921c84a3581dd56cb9c2602f 100644
--- a/chrome/browser/ui/webui/settings/search_engines_handler.cc
+++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc
@@ -155,9 +155,8 @@ void SearchEnginesHandler::OnItemsRemoved(int start, int length) {
OnModelChanged();
}
-base::DictionaryValue* SearchEnginesHandler::CreateDictionaryForEngine(
- int index,
- bool is_default) {
+std::unique_ptr<base::DictionaryValue>
+SearchEnginesHandler::CreateDictionaryForEngine(int index, bool is_default) {
TemplateURLTableModel* table_model = list_controller_.table_model();
const TemplateURL* template_url = list_controller_.GetTemplateURL(index);
@@ -165,7 +164,7 @@ base::DictionaryValue* SearchEnginesHandler::CreateDictionaryForEngine(
// chrome/browser/resources/settings/search_engines_page/
// in @typedef for SearchEngine. Please update it whenever you add or remove
// any keys here.
- base::DictionaryValue* dict = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("name", template_url->short_name());
dict->SetString("displayName",
table_model->GetText(

Powered by Google App Engine
This is Rietveld 408576698