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

Unified Diff: chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: No ListValue::SetDouble Created 3 years, 8 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/options/chromeos/keyboard_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
index 4297e46b404ebe19bf27f16d17b31819f8fd131a..1d6882b886df6e242b87adbd6f68278223dfdb27 100644
--- a/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/keyboard_handler.cc
@@ -139,7 +139,7 @@ void KeyboardHandler::GetLocalizedValues(
IDS_OPTIONS_SETTINGS_SHOW_KEYBOARD_SHORTCUTS));
for (size_t i = 0; i < arraysize(kDataValuesNames); ++i) {
- base::ListValue* list_value = new base::ListValue();
+ auto list_value = base::MakeUnique<base::ListValue>();
for (size_t j = 0; j < arraysize(kModifierKeysSelectItems); ++j) {
const input_method::ModifierKey value =
kModifierKeysSelectItems[j].value;
@@ -149,7 +149,7 @@ void KeyboardHandler::GetLocalizedValues(
option->AppendString(l10n_util::GetStringUTF16(message_id));
list_value->Append(std::move(option));
}
- localized_strings->Set(kDataValuesNames[i], list_value);
+ localized_strings->Set(kDataValuesNames[i], std::move(list_value));
}
}

Powered by Google App Engine
This is Rietveld 408576698