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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc

Issue 130613004: Enabled consumer kiosk mode for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/app_mode/kiosk_app_manager.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
index 76ee18e0fed69646b2602ac3b5aa6d7106e79f2c..45595dbacd67ebe186b59e3f3ae09a43f5ae26c0 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -112,8 +112,8 @@ void KioskAppManager::SetAutoLaunchApp(const std::string& app_id) {
kAccountsPrefDeviceLocalAccountAutoLoginDelay, 0);
}
-void KioskAppManager::EnableConsumerModeKiosk(
- const KioskAppManager::EnableKioskModeCallback& callback) {
+void KioskAppManager::EnableConsumerModeKioskAutoStart(
+ const KioskAppManager::EnableKioskAutoLaunchCallback& callback) {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
connector->GetInstallAttributes()->LockDevice(
@@ -124,8 +124,8 @@ void KioskAppManager::EnableConsumerModeKiosk(
&KioskAppManager::OnLockDevice, base::Unretained(this), callback));
}
-void KioskAppManager::GetConsumerKioskModeStatus(
- const KioskAppManager::GetConsumerKioskModeStatusCallback& callback) {
+void KioskAppManager::GetConsumerKioskAutoLaunchStatus(
+ const KioskAppManager::GetConsumerKioskAutoLaunchStatusCallback& callback) {
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
connector->GetInstallAttributes()->ReadImmutableAttributes(
@@ -135,7 +135,7 @@ void KioskAppManager::GetConsumerKioskModeStatus(
}
void KioskAppManager::OnLockDevice(
- const KioskAppManager::EnableKioskModeCallback& callback,
+ const KioskAppManager::EnableKioskAutoLaunchCallback& callback,
policy::EnterpriseInstallAttributes::LockResult result) {
if (callback.is_null())
return;
@@ -144,7 +144,7 @@ void KioskAppManager::OnLockDevice(
}
void KioskAppManager::OnOwnerFileChecked(
- const KioskAppManager::GetConsumerKioskModeStatusCallback& callback,
+ const KioskAppManager::GetConsumerKioskAutoLaunchStatusCallback& callback,
bool* owner_present) {
ownership_established_ = *owner_present;
@@ -154,17 +154,19 @@ void KioskAppManager::OnOwnerFileChecked(
// If we have owner already established on the machine, don't let
// consumer kiosk to be enabled.
if (ownership_established_)
- callback.Run(CONSUMER_KIOSK_MODE_DISABLED);
+ callback.Run(CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED);
else
- callback.Run(CONSUMER_KIOSK_MODE_CONFIGURABLE);
+ callback.Run(CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE);
}
void KioskAppManager::OnReadImmutableAttributes(
- const KioskAppManager::GetConsumerKioskModeStatusCallback& callback) {
+ const KioskAppManager::GetConsumerKioskAutoLaunchStatusCallback&
+ callback) {
if (callback.is_null())
return;
- ConsumerKioskModeStatus status = CONSUMER_KIOSK_MODE_DISABLED;
+ ConsumerKioskAutoLaunchStatus status =
+ CONSUMER_KIOSK_AUTO_LAUNCH_DISABLED;
policy::BrowserPolicyConnectorChromeOS* connector =
g_browser_process->platform_part()->browser_policy_connector_chromeos();
policy::EnterpriseInstallAttributes* attributes =
@@ -172,7 +174,7 @@ void KioskAppManager::OnReadImmutableAttributes(
switch (attributes->GetMode()) {
case policy::DEVICE_MODE_NOT_SET: {
if (!base::SysInfo::IsRunningOnChromeOS()) {
- status = CONSUMER_KIOSK_MODE_CONFIGURABLE;
+ status = CONSUMER_KIOSK_AUTO_LAUNCH_CONFIGURABLE;
} else if (!ownership_established_) {
bool* owner_present = new bool(false);
content::BrowserThread::PostBlockingPoolTaskAndReply(
@@ -188,7 +190,7 @@ void KioskAppManager::OnReadImmutableAttributes(
break;
}
case policy::DEVICE_MODE_CONSUMER_KIOSK:
- status = CONSUMER_KIOSK_MODE_ENABLED;
+ status = CONSUMER_KIOSK_AUTO_LAUNCH_ENABLED;
break;
default:
break;

Powered by Google App Engine
This is Rietveld 408576698