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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util.cc

Issue 2415993002: Remove use of deprecated base::ListValue::Append(Value*) overload in //chrome/browser/ui/webui (Closed)
Patch Set: Add missing includes Created 4 years, 2 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/chromeos/login/l10n_util.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
index e6fe8c950ed8d13969318280c4b249e710fc4363..0130de1b485eb8acea82054e98911e8a89971ce3 100644
--- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -76,7 +76,7 @@ void AddOptgroupOtherLayouts(base::ListValue* input_methods_list) {
input_methods_list->Append(std::move(optgroup));
}
-base::DictionaryValue* CreateLanguageEntry(
+std::unique_ptr<base::DictionaryValue> CreateLanguageEntry(
const std::string& language_code,
const base::string16& language_display_name,
const base::string16& language_native_display_name) {
@@ -89,13 +89,12 @@ base::DictionaryValue* CreateLanguageEntry(
base::i18n::StringContainsStrongRTLChars(display_name);
const std::string directionality = has_rtl_chars ? "rtl" : "ltr";
- std::unique_ptr<base::DictionaryValue> dictionary(
- new base::DictionaryValue());
+ auto dictionary = base::MakeUnique<base::DictionaryValue>();
dictionary->SetString("code", language_code);
dictionary->SetString("displayName", language_display_name);
dictionary->SetString("textDirection", directionality);
dictionary->SetString("nativeDisplayName", language_native_display_name);
- return dictionary.release();
+ return dictionary;
}
// Gets the list of languages with |descriptors| based on |base_language_codes|.

Powered by Google App Engine
This is Rietveld 408576698