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

Unified Diff: chrome/browser/chromeos/policy/enterprise_install_attributes.cc

Issue 130613004: Enabled consumer kiosk mode for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/chromeos/policy/enterprise_install_attributes.cc
diff --git a/chrome/browser/chromeos/policy/enterprise_install_attributes.cc b/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
index bc78b5813f07cfdb4605fa681a17802b52cc43be..76119a2bc72e0b59cea2c8a95b1a37b9abc0bccf 100644
--- a/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
+++ b/chrome/browser/chromeos/policy/enterprise_install_attributes.cc
@@ -31,7 +31,7 @@ std::string GetDeviceModeString(DeviceMode mode) {
return EnterpriseInstallAttributes::kEnterpiseDeviceMode;
case DEVICE_MODE_RETAIL_KIOSK:
return EnterpriseInstallAttributes::kRetailKioskDeviceMode;
- case DEVICE_MODE_CONSUMER_KIOSK:
+ case DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH:
return EnterpriseInstallAttributes::kConsumerKioskDeviceMode;
case DEVICE_MODE_PENDING:
case DEVICE_MODE_NOT_SET:
@@ -51,7 +51,7 @@ DeviceMode GetDeviceModeFromString(
else if (mode == EnterpriseInstallAttributes::kRetailKioskDeviceMode)
return DEVICE_MODE_RETAIL_KIOSK;
else if (mode == EnterpriseInstallAttributes::kConsumerKioskDeviceMode)
- return DEVICE_MODE_CONSUMER_KIOSK;
+ return DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH;
NOTREACHED() << "Unknown device mode string: " << mode;
return DEVICE_MODE_NOT_SET;
}
@@ -190,7 +190,7 @@ void EnterpriseInstallAttributes::LockDevice(
// Check for existing lock first.
if (device_locked_) {
- if (device_mode == DEVICE_MODE_CONSUMER_KIOSK) {
+ if (device_mode == DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH) {
callback.Run((registration_mode_ == device_mode) ? LOCK_SUCCESS :
LOCK_NOT_READY);
} else {
@@ -247,7 +247,7 @@ void EnterpriseInstallAttributes::LockDeviceIfAttributesIsReady(
if (!user.empty())
registration_user = gaia::CanonicalizeEmail(user);
- if (device_mode == DEVICE_MODE_CONSUMER_KIOSK) {
+ if (device_mode == DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH) {
// Set values in the InstallAttrs and lock it.
if (!cryptohome_util::InstallAttributesSet(kAttrConsumerKioskEnabled,
"true")) {
@@ -303,8 +303,9 @@ bool EnterpriseInstallAttributes::IsEnterpriseDevice() {
return device_locked_ && !registration_user_.empty();
}
-bool EnterpriseInstallAttributes::IsConsumerKioskDevice() {
- return device_locked_ && registration_mode_ == DEVICE_MODE_CONSUMER_KIOSK;
+bool EnterpriseInstallAttributes::IsConsumerKioskDeviceWithAutoLaunch() {
+ return device_locked_ &&
+ registration_mode_ == DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH;
}
std::string EnterpriseInstallAttributes::GetRegistrationUser() {
@@ -365,7 +366,7 @@ void EnterpriseInstallAttributes::DecodeInstallAttributes(
kAttrConsumerKioskEnabled,
&consumer_kiosk_enabled) &&
consumer_kiosk_enabled == "true") {
- registration_mode_ = DEVICE_MODE_CONSUMER_KIOSK;
+ registration_mode_ = DEVICE_MODE_CONSUMER_KIOSK_AUTOLAUNCH;
} else if (enterprise_user.empty() && enterprise_owned != "true") {
// |registration_user_| is empty on consumer devices.
registration_mode_ = DEVICE_MODE_CONSUMER;

Powered by Google App Engine
This is Rietveld 408576698