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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2639033002: Restore auto-launched state on kiosk restart within session (Closed)
Patch Set: Attempt No 2 Created 3 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698