Commit c53ffd70 authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

Reshow Crostini Upgrader window on app launch.

When a user attempts to launch a Crostini app during the upgrade,
we redisplay the Upgrader window as feedback that they can't launch yet.

Bug: 1064528
Change-Id: I4d27a0afc2c8d0592db9a6e0f2ae2f0cffb0e89e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2129797
Auto-Submit: Nicholas Verne <nverne@chromium.org>
Commit-Queue: Nic Hollingum <hollingum@google.com>
Reviewed-by: default avatarNic Hollingum <hollingum@google.com>
Cr-Commit-Position: refs/heads/master@{#755247}
parent 00812534
......@@ -589,6 +589,7 @@ class CrostiniManager : public KeyedService,
}
void SetCrostiniDialogStatus(DialogType dialog_type, bool open);
// Returns true if the dialog is open.
bool GetCrostiniDialogStatus(DialogType dialog_type) const;
void AddCrostiniDialogStatusObserver(CrostiniDialogStatusObserver* observer);
void RemoveCrostiniDialogStatusObserver(
......
......@@ -495,7 +495,8 @@ void LaunchCrostiniApp(Profile* profile,
}
if (crostini_manager->ShouldPromptContainerUpgrade(
ContainerId(registration->VmName(), registration->ContainerName()))) {
ContainerId(registration->VmName(), registration->ContainerName())) ||
crostini_manager->GetCrostiniDialogStatus(DialogType::UPGRADER)) {
chromeos::CrostiniUpgraderDialog::Show(
base::BindOnce(&LaunchCrostiniAppImpl, profile, app_id, display_id,
files, std::move(registration), std::move(callback)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment