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

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

Issue 23904025: Move IsRunningOnChromeOS to SysInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 7 years, 2 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>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/chromeos/chromeos_version.h"
14 #include "base/command_line.h" 13 #include "base/command_line.h"
15 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/sys_info.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "chrome/browser/chromeos/login/user_manager.h" 17 #include "chrome/browser/chromeos/login/user_manager.h"
18 #include "chrome/browser/chromeos/settings/cros_settings.h" 18 #include "chrome/browser/chromeos/settings/cros_settings.h"
19 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 19 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
20 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
21 #include "chromeos/chromeos_switches.h" 21 #include "chromeos/chromeos_switches.h"
22 #include "content/public/browser/web_ui.h" 22 #include "content/public/browser/web_ui.h"
23 #include "content/public/browser/web_ui_data_source.h" 23 #include "content/public/browser/web_ui_data_source.h"
24 #include "grit/chromium_strings.h" 24 #include "grit/chromium_strings.h"
25 #include "grit/generated_resources.h" 25 #include "grit/generated_resources.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 app_id_value); 192 app_id_value);
193 } 193 }
194 194
195 195
196 void KioskAppsHandler::OnGetConsumerKioskModeStatus( 196 void KioskAppsHandler::OnGetConsumerKioskModeStatus(
197 chromeos::KioskAppManager::ConsumerKioskModeStatus status) { 197 chromeos::KioskAppManager::ConsumerKioskModeStatus status) {
198 initialized_ = true; 198 initialized_ = true;
199 is_kiosk_enabled_ = 199 is_kiosk_enabled_ =
200 ((status == KioskAppManager::CONSUMER_KIOSK_MODE_ENABLED) && 200 ((status == KioskAppManager::CONSUMER_KIOSK_MODE_ENABLED) &&
201 chromeos::UserManager::Get()->IsCurrentUserOwner()) || 201 chromeos::UserManager::Get()->IsCurrentUserOwner()) ||
202 !base::chromeos::IsRunningOnChromeOS(); 202 !base::SysInfo::IsRunningOnChromeOS();
203 203
204 if (is_kiosk_enabled_) { 204 if (is_kiosk_enabled_) {
205 base::FundamentalValue enabled(is_kiosk_enabled_); 205 base::FundamentalValue enabled(is_kiosk_enabled_);
206 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.enableKiosk", 206 web_ui()->CallJavascriptFunction("extensions.KioskAppsOverlay.enableKiosk",
207 enabled); 207 enabled);
208 } 208 }
209 } 209 }
210 210
211 211
212 void KioskAppsHandler::OnKioskAppsSettingsChanged() { 212 void KioskAppsHandler::OnKioskAppsSettingsChanged() {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 bool disable_bailout_shortcut; 316 bool disable_bailout_shortcut;
317 CHECK(args->GetBoolean(0, &disable_bailout_shortcut)); 317 CHECK(args->GetBoolean(0, &disable_bailout_shortcut));
318 318
319 CrosSettings::Get()->SetBoolean( 319 CrosSettings::Get()->SetBoolean(
320 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled, 320 kAccountsPrefDeviceLocalAccountAutoLoginBailoutEnabled,
321 !disable_bailout_shortcut); 321 !disable_bailout_shortcut);
322 } 322 }
323 323
324 } // namespace chromeos 324 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698