Index: chrome/browser/chromeos/login/app_launch_controller.cc |
diff --git a/chrome/browser/chromeos/login/app_launch_controller.cc b/chrome/browser/chromeos/login/app_launch_controller.cc |
index 004ac856d30a1d791c97f106d19a7a4b13beb662..e8bc45258eab249615e0c335d89ba6f3389605d0 100644 |
--- a/chrome/browser/chromeos/login/app_launch_controller.cc |
+++ b/chrome/browser/chromeos/login/app_launch_controller.cc |
@@ -126,7 +126,7 @@ AppLaunchController::~AppLaunchController() { |
app_launch_splash_screen_actor_->SetDelegate(NULL); |
} |
-void AppLaunchController::StartAppLaunch() { |
+void AppLaunchController::StartAppLaunch(bool is_auto_launch) { |
DVLOG(1) << "Starting kiosk mode..."; |
webui_visible_ = host_->GetWebUILoginView()->webui_visible(); |
@@ -143,6 +143,21 @@ void AppLaunchController::StartAppLaunch() { |
KioskAppManager::App app; |
CHECK(KioskAppManager::Get()); |
CHECK(KioskAppManager::Get()->GetApp(app_id_, &app)); |
+ |
+ if (is_auto_launch) { |
+ int delay; |
+ if (!CrosSettings::Get()->GetInteger( |
+ kAccountsPrefDeviceLocalAccountAutoLoginDelay, &delay)) { |
bartfab (slow)
2015/02/06 12:07:39
Nit: #include "chromeos/settings/cros_settings_nam
Andrew T Wilson (Slow)
2015/02/06 13:24:20
Done.
|
+ delay = 0; |
+ } |
+ DCHECK_EQ(0, delay) << "Kiosks do not support non-zero auto-login delays"; |
bartfab (slow)
2015/02/06 12:07:39
It is great that you are putting this check in pla
Andrew T Wilson (Slow)
2015/02/06 13:24:20
Done.
|
+ |
+ // If we are launching a kiosk app with zero delay, mark it as |
+ // auto-launched. |
+ if (delay == 0) |
+ KioskAppManager::Get()->SetAppWasAutoLaunched(app_id_); |
+ } |
+ |
kiosk_profile_loader_.reset( |
new KioskProfileLoader(app.user_id, false, this)); |
kiosk_profile_loader_->Start(); |