Index: chrome/browser/ui/webui/options/language_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/language_options_handler.cc b/chrome/browser/ui/webui/options/language_options_handler.cc |
index 66c7e9cedeced45c79b22968c5ae578bb34bfc7e..1549192785d3aa1df4d2d7247579587bfa2949c3 100644 |
--- a/chrome/browser/ui/webui/options/language_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/language_options_handler.cc |
@@ -15,6 +15,7 @@ |
#include "base/bind.h" |
#include "base/command_line.h" |
#include "base/i18n/rtl.h" |
+#include "base/memory/ptr_util.h" |
#include "base/metrics/user_metrics.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/values.h" |
@@ -57,7 +58,7 @@ void LanguageOptionsHandler::RegisterMessages() { |
base::Unretained(this))); |
} |
-base::ListValue* LanguageOptionsHandler::GetLanguageList() { |
+std::unique_ptr<base::ListValue> LanguageOptionsHandler::GetLanguageList() { |
// Collect the language codes from the supported accept-languages. |
const std::string app_locale = g_browser_process->GetApplicationLocale(); |
std::vector<std::string> language_codes; |
@@ -91,7 +92,7 @@ base::ListValue* LanguageOptionsHandler::GetLanguageList() { |
l10n_util::SortStrings16(app_locale, &display_names); |
// Build the language list from the language map. |
- base::ListValue* language_list = new base::ListValue(); |
+ auto language_list = base::MakeUnique<base::ListValue>(); |
for (size_t i = 0; i < display_names.size(); ++i) { |
base::string16& display_name = display_names[i]; |
base::string16 adjusted_display_name(display_name); |