Commit f9cb2910 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Commit Bot

[Autofill Assistant] Do not implicitly hide progress bar at 100%.

See b/118735405.

Change-Id: Ia759ad8bab73d9479d832aa7dd187b51337773fc
Reviewed-on: https://chromium-review.googlesource.com/c/1312479Reviewed-by: default avatarStephane Zermatten <szermatt@chromium.org>
Commit-Queue: Jordan Demeulenaere <jdemeulenaere@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604589}
parent 3feabd44
...@@ -24,11 +24,11 @@ ShowProgressBarAction::~ShowProgressBarAction() {} ...@@ -24,11 +24,11 @@ ShowProgressBarAction::~ShowProgressBarAction() {}
void ShowProgressBarAction::InternalProcessAction( void ShowProgressBarAction::InternalProcessAction(
ActionDelegate* delegate, ActionDelegate* delegate,
ProcessActionCallback callback) { ProcessActionCallback callback) {
int progress = if (proto_.show_progress_bar().done()) {
std::min(100, std::max(0, proto_.show_progress_bar().progress()));
if (proto_.show_progress_bar().done() || progress == 100) {
delegate->HideProgressBar(); delegate->HideProgressBar();
} else { } else {
int progress =
std::min(100, std::max(0, proto_.show_progress_bar().progress()));
delegate->ShowProgressBar(progress, proto_.show_progress_bar().message()); delegate->ShowProgressBar(progress, proto_.show_progress_bar().message());
} }
......
...@@ -378,7 +378,6 @@ message ShowProgressBarProto { ...@@ -378,7 +378,6 @@ message ShowProgressBarProto {
// Value between 0 and 100 indicating the current progress. Values above 100 // Value between 0 and 100 indicating the current progress. Values above 100
// will be capped to 100, values below 0 will be capped to 0 by the client. // will be capped to 100, values below 0 will be capped to 0 by the client.
// NOTE: Setting |progress| to 100 is an equivalent of setting |done| to true.
optional int32 progress = 6; optional int32 progress = 6;
} }
......
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