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

Unified Diff: chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_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/chromeos/login/app_launch_splash_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
index 865ceac8d9f29b416167cc64049ea7cef77968ea..3933864bdf07db6f9a5ba1a8be13fe68ccea7eb9 100644
--- a/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.cc
@@ -4,6 +4,10 @@
#include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handler.h"
+#include <utility>
+
+#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
#include "chrome/browser/chromeos/login/oobe_screen.h"
#include "chrome/browser/chromeos/login/screens/network_error.h"
@@ -85,10 +89,9 @@ void AppLaunchSplashScreenHandler::Show(const std::string& app_id) {
data.SetBoolean("shortcutEnabled",
!KioskAppManager::Get()->GetDisableBailoutShortcut());
- // |data| will take ownership of |app_info|.
- base::DictionaryValue *app_info = new base::DictionaryValue();
- PopulateAppInfo(app_info);
- data.Set("appInfo", app_info);
+ auto app_info = base::MakeUnique<base::DictionaryValue>();
+ PopulateAppInfo(app_info.get());
+ data.Set("appInfo", std::move(app_info));
SetLaunchText(l10n_util::GetStringUTF8(GetProgressMessageFromState(state_)));
ShowScreenWithData(kScreenId, &data);
« no previous file with comments | « chrome/browser/ui/webui/chromeos/drive_internals_ui.cc ('k') | chrome/browser/ui/webui/chromeos/login/network_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698