Information about whether a kiosk app was autolaunched gets lost after crash restore |
||||||||
Issue descriptionInformation about whether a kiosk app was auto-launched is kept in memory, which means that it gets reset in event of a browser crash. When user session is restarted after the crash, the auto launched app id (KioskAppManager::currently_auto_launched_with_zero_delay_app_) does not get properly set (as there is no way to determine whether kiosk session was auto launched at that point) - as the result, the session is not considered auto launched by code whose behavior depends on said flag. For example, in restored session following is broken: - chrome.fileSystem.requestFileSystem asks user confirmation for giving access to requested file system (as it should for non-auto-launched kiosk sessions) - peripheral chrome.bluetoothLowEnergy start failing with permissions error.
,
Jan 3 2017
Right. Auto launch state is not preserved. On crash-n-restart, the app is launched here: https://cs.chromium.org/chromium/src/chrome/browser/ui/startup/startup_browser_creator.cc?rcl=0&l=640 And we don't have whether this is an auto launch info there. One possible way to preserve the info is to create a command line switch. Session manager would keep the switch for us. We figure out which app to relaunch via "--app-id". And probably can add a "--auto-launched" to keep the info across restarts.
,
Jan 13 2017
Yeah, one way to fix this would be to let session manager know that current session is autolaunched, and have it append --auto-launched flag when Chrome is restarted (e.g. using SetFlagsForUser, though this could get a little tricky when kiosk session flags are non-empty, e.g. due to policy flags). Another possibility would be to add a flag 'kiosk.restoreSessionAsAutoLaunched' (or something along these lines) to local_state, and set it appropriately when an app is launched. Then when restoring session from crash, autolaunched state could be initialized base on that flag's value.
,
Jan 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb commit 663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb Author: tbarzic <tbarzic@chromium.org> Date: Wed Jan 25 23:51:01 2017 Restore auto-launched state on kiosk restart within session When kiosk app is restarted within a kiosk session - e.g. due to crash, app's auto-launched state has to be preserved. Previously auto-launched state was kept only in memory - if kiosk was restarted, the information would get lost. This CL is attempt to fix the problem by preserving auto-launched state by setting a user session scoped flag that indicates that the kiosk app is auto-launched (newly introduced app-auto-launched). The flag will be scoped to current used session, and will be passed to Chrome in a case Chrome restarts withing the user session. On restart, the flag can be used to deduce whether the kiosk app should be considered auto-launched or not. Note that when setting the auto-launched flag, it's important to consider current set of policy defined flags - they should be preserved when auto-launched flag is added to set of user flags. BUG= 677340 Review-Url: https://codereview.chromium.org/2639033002 Cr-Commit-Position: refs/heads/master@{#446166} [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/browser/chromeos/app_mode/kiosk_app_manager.h [delete] https://crrev.com/0d3069a5ad51f4d337927f5a1ed4e0945488d7c1/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc [add] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/browser/chromeos/login/session/user_session_manager.cc [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chrome/test/BUILD.gn [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chromeos/chromeos_switches.cc [modify] https://crrev.com/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb/chromeos/chromeos_switches.h
,
Jan 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/92ebeda78b7d6e27e7afa0ef44c82140ce682441 commit 92ebeda78b7d6e27e7afa0ef44c82140ce682441 Author: kjellander <kjellander@chromium.org> Date: Thu Jan 26 05:46:42 2017 Revert of Restore auto-launched state on kiosk restart within session (patchset #6 id:100001 of https://codereview.chromium.org/2639033002/ ) Reason for revert: browser_tests test AutoLaunchedKioskTest.PRE_CrashRestore starts timing out reliably with this CL, starting with https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/32762 Original issue's description: > Restore auto-launched state on kiosk restart within session > > When kiosk app is restarted within a kiosk session - e.g. due to crash, > app's auto-launched state has to be preserved. Previously auto-launched > state was kept only in memory - if kiosk was restarted, the information > would get lost. > This CL is attempt to fix the problem by preserving auto-launched state > by setting a user session scoped flag that indicates that the kiosk app > is auto-launched (newly introduced app-auto-launched). The flag will be > scoped to current used session, and will be passed to Chrome in a case > Chrome restarts withing the user session. On restart, the flag can be > used to deduce whether the kiosk app should be considered auto-launched > or not. > > Note that when setting the auto-launched flag, it's important to > consider current set of policy defined flags - they should be > preserved when auto-launched flag is added to set of user flags. > > BUG= 677340 > > Review-Url: https://codereview.chromium.org/2639033002 > Cr-Commit-Position: refs/heads/master@{#446166} > Committed: https://chromium.googlesource.com/chromium/src/+/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb TBR=xiyuan@chromium.org,tbarzic@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 677340 Review-Url: https://codereview.chromium.org/2658773002 Cr-Commit-Position: refs/heads/master@{#446240} [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/browser/chromeos/app_mode/kiosk_app_manager.h [add] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc [delete] https://crrev.com/99fb0a7ab0aa355d6d2bd17ca0d6940b57ec44b4/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/browser/chromeos/login/session/user_session_manager.cc [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chrome/test/BUILD.gn [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chromeos/chromeos_switches.cc [modify] https://crrev.com/92ebeda78b7d6e27e7afa0ef44c82140ce682441/chromeos/chromeos_switches.h
,
Jan 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7 commit c6b3e0d3813eb1bc13bbaba9e5d19054890606c7 Author: tbarzic <tbarzic@chromium.org> Date: Thu Jan 26 20:19:14 2017 Restore auto-launched state on kiosk restart within session When kiosk app is restarted within a kiosk session - e.g. due to crash, app's auto-launched state has to be preserved. Previously auto-launched state was kept only in memory - if kiosk was restarted, the information would get lost. This CL is attempt to fix the problem by preserving auto-launched state by setting a user session scoped flag that indicates that the kiosk app is auto-launched (newly introduced app-auto-launched). The flag will be scoped to current used session, and will be passed to Chrome in a case Chrome restarts withing the user session. On restart, the flag can be used to deduce whether the kiosk app should be considered auto-launched or not. Note that when setting the auto-launched flag, it's important to consider current set of policy defined flags - they should be preserved when auto-launched flag is added to set of user flags. BUG= 677340 Review-Url: https://codereview.chromium.org/2639033002 Cr-Original-Commit-Position: refs/heads/master@{#446166} Committed: https://chromium.googlesource.com/chromium/src/+/663f7dfaa3b96b353ade5b9ce6b7616e51ba73bb Review-Url: https://codereview.chromium.org/2639033002 Cr-Commit-Position: refs/heads/master@{#446427} [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/browser/chromeos/app_mode/kiosk_app_manager.h [delete] https://crrev.com/a02187345a2ce4d5f929816aaddb1369a0afbed1/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc [add] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/browser/chromeos/login/session/user_session_manager.cc [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chrome/test/BUILD.gn [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chromeos/chromeos_switches.cc [modify] https://crrev.com/c6b3e0d3813eb1bc13bbaba9e5d19054890606c7/chromeos/chromeos_switches.h
,
Jan 27 2017
,
Feb 7 2017
requesting merge - note that this should fix KioskCrashRestoreTest breakage (https://bugs.chromium.org/p/chromium/issues/detail?id=689100) - the cl fix for this issue removes the test in question
,
Feb 7 2017
This bug requires manual review: Reverts referenced in bugdroid comments after merge request. Please contact the milestone owner if you have questions. Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 22 2017
,
Mar 3 2017
,
Mar 3 2017
,
Jan 22 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by tbarzic@chromium.org
, Dec 28 2016