| Index: chrome/browser/chromeos/login/session/user_session_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| index fe16fe3ab9274e7c0633d98897f129067ed9759a..145a9eea2af8b3ddc16471d22d8928525864c518 100644
|
| --- a/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| @@ -581,14 +581,18 @@ void UserSessionManager::InitNonKioskExtensionFeaturesSessionType(
|
| // type has be set before kiosk app controller takes over, as at that point
|
| // kiosk app profile would already be initialized - feature session type
|
| // should be set before that.
|
| - // TODO(tbarzic): Note that this does not work well for auto-launched
|
| - // sessions, as information about whether session was auto-launched is not
|
| - // persisted over session restart - http://crbug.com/677340.
|
| if (user->GetType() == user_manager::USER_TYPE_KIOSK_APP) {
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kLoginUser)) {
|
| + // For kiosk session crash recovery, feature session type has be set
|
| + // before kiosk app controller takes over, as at that point iosk app
|
| + // profile would already be initialized - feature session type
|
| + // should be set before that.
|
| + bool auto_launched = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kAppAutoLaunched);
|
| extensions::SetCurrentFeatureSessionType(
|
| - extensions::FeatureSessionType::KIOSK);
|
| + auto_launched ? extensions::FeatureSessionType::AUTOLAUNCHED_KIOSK
|
| + : extensions::FeatureSessionType::KIOSK);
|
| }
|
| return;
|
| }
|
|
|