Commit e12dc447 authored by Kunihiko Sakamoto's avatar Kunihiko Sakamoto Committed by Commit Bot

Revert "Crostini Upgrader: Do not proceed if user cancels backup"

This reverts commit 9b8ade13.

Reason for revert: Suspected for CrostiniUpgraderBrowserTest.All failure on linux-chromeos-chrome
https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-chrome/4053

Original change's description:
> Crostini Upgrader: Do not proceed if user cancels backup
> 
> Previously if the user cancelled the backup, we would proceed with the
> upgrade as though the user had elected not to backup at all.
> 
> With this change, the flow will instead return to the initial screen
> when the user cancels, rather than proceed.
> 
> Bug: 1061203
> Change-Id: I7be99a2c7a6caa4b5fd143def5ba0c6f9b4d5004
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102935
> Reviewed-by: Nicholas Verne <nverne@chromium.org>
> Commit-Queue: Nic Hollingum <hollingum@google.com>
> Cr-Commit-Position: refs/heads/master@{#750833}

TBR=nverne@chromium.org,hollingum@google.com

Change-Id: I7013aeba5b114186425d4279b8ef877c2bddcb79
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1061203
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105664Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750870}
parent eeff9873
......@@ -123,10 +123,11 @@ void CrostiniUpgrader::StatusTracker::SetStatusDoneUI() {
}
void CrostiniUpgrader::StatusTracker::SetStatusCancelledUI() {
// Cancelling the restore results in "success" i.e. we successfully didn't try
// to restore. Cancelling the backup is a no-op that returns you to the
// original screen.
if (type() == ExportImportType::IMPORT) {
// Successfully canceled backup/restore. Upgrade can continue but we will not
// use that backup to restore from.
if (type() == ExportImportType::EXPORT) {
upgrader_->OnBackup(CrostiniResult::SUCCESS, base::nullopt);
} else {
upgrader_->OnRestore(CrostiniResult::SUCCESS);
}
for (auto& observer : upgrader_->upgrader_observers_) {
......
......@@ -106,7 +106,7 @@ Polymer({
this.listenerIds_ = [
callbackRouter.onBackupProgress.addListener((percent) => {
this.state_ = State.BACKUP;
assert(this.state_ === State.BACKUP);
this.backupProgress_ = percent;
}),
callbackRouter.onBackupSucceeded.addListener((wasCancelled) => {
......@@ -256,6 +256,7 @@ Polymer({
* @private
*/
startBackup_(showFileChooser) {
this.state_ = State.BACKUP;
BrowserProxy.getInstance().handler.backup(showFileChooser);
},
......
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