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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle r.h" 5 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle r.h"
6 6
7 #include <utility>
8
9 #include "base/memory/ptr_util.h"
10 #include "base/values.h"
7 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 11 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
8 #include "chrome/browser/chromeos/login/oobe_screen.h" 12 #include "chrome/browser/chromeos/login/oobe_screen.h"
9 #include "chrome/browser/chromeos/login/screens/network_error.h" 13 #include "chrome/browser/chromeos/login/screens/network_error.h"
10 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 14 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
11 #include "chrome/grit/chrome_unscaled_resources.h" 15 #include "chrome/grit/chrome_unscaled_resources.h"
12 #include "chrome/grit/chromium_strings.h" 16 #include "chrome/grit/chromium_strings.h"
13 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
14 #include "chromeos/network/network_state.h" 18 #include "chromeos/network/network_state.h"
15 #include "chromeos/network/network_state_handler.h" 19 #include "chromeos/network/network_state_handler.h"
16 #include "components/login/localized_values_builder.h" 20 #include "components/login/localized_values_builder.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 app_id_ = app_id; 82 app_id_ = app_id;
79 if (!page_is_ready()) { 83 if (!page_is_ready()) {
80 show_on_init_ = true; 84 show_on_init_ = true;
81 return; 85 return;
82 } 86 }
83 87
84 base::DictionaryValue data; 88 base::DictionaryValue data;
85 data.SetBoolean("shortcutEnabled", 89 data.SetBoolean("shortcutEnabled",
86 !KioskAppManager::Get()->GetDisableBailoutShortcut()); 90 !KioskAppManager::Get()->GetDisableBailoutShortcut());
87 91
88 // |data| will take ownership of |app_info|. 92 auto app_info = base::MakeUnique<base::DictionaryValue>();
89 base::DictionaryValue *app_info = new base::DictionaryValue(); 93 PopulateAppInfo(app_info.get());
90 PopulateAppInfo(app_info); 94 data.Set("appInfo", std::move(app_info));
91 data.Set("appInfo", app_info);
92 95
93 SetLaunchText(l10n_util::GetStringUTF8(GetProgressMessageFromState(state_))); 96 SetLaunchText(l10n_util::GetStringUTF8(GetProgressMessageFromState(state_)));
94 ShowScreenWithData(kScreenId, &data); 97 ShowScreenWithData(kScreenId, &data);
95 } 98 }
96 99
97 void AppLaunchSplashScreenHandler::RegisterMessages() { 100 void AppLaunchSplashScreenHandler::RegisterMessages() {
98 AddCallback("configureNetwork", 101 AddCallback("configureNetwork",
99 &AppLaunchSplashScreenHandler::HandleConfigureNetwork); 102 &AppLaunchSplashScreenHandler::HandleConfigureNetwork);
100 AddCallback("cancelAppLaunch", 103 AddCallback("cancelAppLaunch",
101 &AppLaunchSplashScreenHandler::HandleCancelAppLaunch); 104 &AppLaunchSplashScreenHandler::HandleCancelAppLaunch);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 DCHECK(online_state_); 276 DCHECK(online_state_);
274 if (delegate_ && online_state_) { 277 if (delegate_ && online_state_) {
275 network_config_requested_ = false; 278 network_config_requested_ = false;
276 network_config_done_ = true; 279 network_config_done_ = true;
277 delegate_->OnNetworkConfigRequested(false); 280 delegate_->OnNetworkConfigRequested(false);
278 Show(app_id_); 281 Show(app_id_);
279 } 282 }
280 } 283 }
281 284
282 } // namespace chromeos 285 } // namespace chromeos
OLDNEW
« 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