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

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

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Rebased 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/chromeos/login/network_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
index e20720e8d0e8147d7d4e4d715784590451efd520..336d10c62b1f873f8d37ffb405cbf272a81e53fc 100644
--- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -246,11 +246,10 @@ void NetworkScreenHandler::GetAdditionalParameters(
const bool enable_layouts =
!user_manager::UserManager::Get()->IsUserLoggedIn() && !is_slave;
- dict->Set("languageList", language_list.release());
- dict->Set(
- "inputMethodsList",
- GetAndActivateLoginKeyboardLayouts(
- application_locale, selected_input_method, enable_layouts).release());
+ dict->Set("languageList", std::move(language_list));
+ dict->Set("inputMethodsList",
+ GetAndActivateLoginKeyboardLayouts(
+ application_locale, selected_input_method, enable_layouts));
dict->Set("timezoneList", GetTimezoneList());
}
@@ -268,7 +267,7 @@ void NetworkScreenHandler::Initialize() {
// NetworkScreenHandler, private: ----------------------------------------------
// static
-base::ListValue* NetworkScreenHandler::GetTimezoneList() {
+std::unique_ptr<base::ListValue> NetworkScreenHandler::GetTimezoneList() {
std::string current_timezone_id;
CrosSettings::Get()->GetString(kSystemTimezone, &current_timezone_id);
@@ -292,7 +291,7 @@ base::ListValue* NetworkScreenHandler::GetTimezoneList() {
timezone_list->Append(std::move(timezone_option));
}
- return timezone_list.release();
+ return timezone_list;
}
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698