Skip to content

Commit

Permalink
Don't force launching web Kiosk when web app fails to install
Browse files Browse the repository at this point in the history
App Service launcher requires an app to be installed to launch it. It
won't fail in case the app data cannot be fetched due to network issue,
in which case a placeholder will be installed and launched normally. We
don't want to launch web app install url in a browser window in case
installation actually fails so that it doesn't hide bugs or critial
issues (for example I/O error).

Bug: b:240493670
Test: None
Change-Id: I7f5dbfa19d6de557ed3379353eecba423868242e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3867074
Reviewed-by: Polina Bondarenko <pbond@chromium.org>
Commit-Queue: Yi Xie <yixie@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1041927}
  • Loading branch information
imxieyi authored and Chromium LUCI CQ committed Sep 1, 2022
1 parent 2db6b13 commit e4e7e6b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chrome/browser/ash/login/app_mode/kiosk_launch_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,13 @@ void KioskLaunchController::OnLaunchFailed(KioskAppLaunchError::Error error) {
DCHECK_NE(KioskAppLaunchError::Error::kNone, error);
SYSLOG(ERROR) << "Kiosk launch failed, error=" << static_cast<int>(error);

if (kiosk_app_id_.type == KioskAppType::kWebApp) {
// App Service launcher requires the web app to be installed. Temporary issues
// like URL redirection should not stop the app from being installed as
// placeholder. Force launching the app is not possible in case installation
// fails.
if (kiosk_app_id_.type == KioskAppType::kWebApp &&
(!base::FeatureList::IsEnabled(features::kKioskEnableAppService) ||
crosapi::browser_util::IsLacrosEnabled())) {
HandleWebAppInstallFailed();
return;
}
Expand Down

0 comments on commit e4e7e6b

Please sign in to comment.