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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/kiosk_app_menu_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (!is_webui_initialized_) 94 if (!is_webui_initialized_)
95 return; 95 return;
96 96
97 KioskAppManager::Apps apps; 97 KioskAppManager::Apps apps;
98 KioskAppManager::Get()->GetApps(&apps); 98 KioskAppManager::Get()->GetApps(&apps);
99 99
100 base::ListValue apps_list; 100 base::ListValue apps_list;
101 for (size_t i = 0; i < apps.size(); ++i) { 101 for (size_t i = 0; i < apps.size(); ++i) {
102 const KioskAppManager::App& app_data = apps[i]; 102 const KioskAppManager::App& app_data = apps[i];
103 103
104 scoped_ptr<base::DictionaryValue> app_info(new base::DictionaryValue); 104 std::unique_ptr<base::DictionaryValue> app_info(new base::DictionaryValue);
105 app_info->SetBoolean("isApp", true); 105 app_info->SetBoolean("isApp", true);
106 app_info->SetString("id", app_data.app_id); 106 app_info->SetString("id", app_data.app_id);
107 app_info->SetString("label", app_data.name); 107 app_info->SetString("label", app_data.name);
108 108
109 std::string icon_url; 109 std::string icon_url;
110 if (app_data.icon.isNull()) { 110 if (app_data.icon.isNull()) {
111 icon_url = 111 icon_url =
112 webui::GetBitmapDataUrl(*ResourceBundle::GetSharedInstance() 112 webui::GetBitmapDataUrl(*ResourceBundle::GetSharedInstance()
113 .GetImageNamed(IDR_APP_DEFAULT_ICON) 113 .GetImageNamed(IDR_APP_DEFAULT_ICON)
114 .ToSkBitmap()); 114 .ToSkBitmap());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void KioskAppMenuHandler::OnKioskAppDataLoadFailure(const std::string& app_id) { 165 void KioskAppMenuHandler::OnKioskAppDataLoadFailure(const std::string& app_id) {
166 SendKioskApps(); 166 SendKioskApps();
167 } 167 }
168 168
169 void KioskAppMenuHandler::UpdateState(NetworkError::ErrorReason reason) { 169 void KioskAppMenuHandler::UpdateState(NetworkError::ErrorReason reason) {
170 if (network_state_informer_->state() == NetworkStateInformer::ONLINE) 170 if (network_state_informer_->state() == NetworkStateInformer::ONLINE)
171 KioskAppManager::Get()->RetryFailedAppDataFetch(); 171 KioskAppManager::Get()->RetryFailedAppDataFetch();
172 } 172 }
173 173
174 } // namespace chromeos 174 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h ('k') | chrome/browser/ui/webui/chromeos/login/l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698