Commit 4b06e412 authored by Stephane Zermatten's avatar Stephane Zermatten Committed by Commit Bot

[Autofill Assistant] Fix bug in ShowProgressBarAction.

Before this patch, when ShowProgressBarAction had no progress set or
progress set to 0, the action would return without calling the callback.
In this case, the script would just hang. This was broken in
http://crrev/c/1445902

With this patch, scripts with 0 progress continue without changing the
progress in any ways. This is guaranteed by Controller::SetProgress,
which only takes progress increases into account. Also, with this patch,
the message of ShowProgressBarAction is taken into account, even if the
progress is unset or set to 0.

Bug: 806868
Change-Id: Id48e43a2e418bfdf307596f93323ff8c873699eb
Reviewed-on: https://chromium-review.googlesource.com/c/1460922Reviewed-by: default avatarClemens Arbesser <arbesser@google.com>
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630319}
parent fd3240ae
......@@ -24,11 +24,6 @@ ShowProgressBarAction::~ShowProgressBarAction() {}
void ShowProgressBarAction::InternalProcessAction(
ActionDelegate* delegate,
ProcessActionCallback callback) {
if (proto_.show_progress_bar().progress() == 0) {
// Old script might still contain a ShowProgressBar action that clears the
// progress. Ignore these.
return;
}
if (!proto_.show_progress_bar().message().empty()) {
delegate->SetStatusMessage(proto_.show_progress_bar().message());
}
......
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