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

Side by Side Diff: chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 | Annotate | Revision Log
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/extensions/chromeos/kiosk_apps_handler.h" 5 #include "chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.showError", 194 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.showError",
195 app_id_value); 195 app_id_value);
196 196
197 kiosk_app_manager_->RemoveApp(app_id); 197 kiosk_app_manager_->RemoveApp(app_id);
198 } 198 }
199 199
200 200
201 void KioskAppsHandler::OnGetConsumerKioskAutoLaunchStatus( 201 void KioskAppsHandler::OnGetConsumerKioskAutoLaunchStatus(
202 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status) { 202 chromeos::KioskAppManager::ConsumerKioskAutoLaunchStatus status) {
203 initialized_ = true; 203 initialized_ = true;
204 is_kiosk_enabled_ = 204 is_kiosk_enabled_ = chromeos::GetUserManager()->IsCurrentUserOwner() ||
205 chromeos::UserManager::Get()->IsCurrentUserOwner() || 205 !base::SysInfo::IsRunningOnChromeOS();
206 !base::SysInfo::IsRunningOnChromeOS();
207 206
208 is_auto_launch_enabled_ = 207 is_auto_launch_enabled_ =
209 status == KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED || 208 status == KioskAppManager::CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED ||
210 !base::SysInfo::IsRunningOnChromeOS(); 209 !base::SysInfo::IsRunningOnChromeOS();
211 210
212 if (is_kiosk_enabled_) { 211 if (is_kiosk_enabled_) {
213 base::DictionaryValue kiosk_params; 212 base::DictionaryValue kiosk_params;
214 kiosk_params.SetBoolean("kioskEnabled", is_kiosk_enabled_); 213 kiosk_params.SetBoolean("kioskEnabled", is_kiosk_enabled_);
215 kiosk_params.SetBoolean("autoLaunchEnabled", is_auto_launch_enabled_); 214 kiosk_params.SetBoolean("autoLaunchEnabled", is_auto_launch_enabled_);
216 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.enableKiosk", 215 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.enableKiosk",
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 326
328 bool disable_bailout_shortcut; 327 bool disable_bailout_shortcut;
329 CHECK(args->GetBoolean(0, &disable_bailout_shortcut)); 328 CHECK(args->GetBoolean(0, &disable_bailout_shortcut));
330 329
331 CrosSettings::Get()->SetBoolean( 330 CrosSettings::Get()->SetBoolean(
332 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, 331 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled,
333 !disable_bailout_shortcut); 332 !disable_bailout_shortcut);
334 } 333 }
335 334
336 } // namespace chromeos 335 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/ui_account_tweaks.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698