Commit 72e2f9c0 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Don't create discard button when prompting for scanning

When prompting the user for APP scanning, the "Discard" button is still
present in the download shelf. It hidden behind the "Scan" button,
but still accessible via Tab/Enter keys, leading to accidental discards
when operating via keyboard.

This CL makes no visible changes to the UX.

Bug: 1049748
Change-Id: Ie4cb9fbc42341cca76bc5479e4ca9f207f7e9226
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2042388Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739147}
parent 1957e811
...@@ -1174,7 +1174,9 @@ void DownloadItemView::ShowWarningDialog() { ...@@ -1174,7 +1174,9 @@ void DownloadItemView::ShowWarningDialog() {
model_->GetDangerType() != model_->GetDangerType() !=
download::DOWNLOAD_DANGER_TYPE_BLOCKED_TOO_LARGE && download::DOWNLOAD_DANGER_TYPE_BLOCKED_TOO_LARGE &&
model_->GetDangerType() != model_->GetDangerType() !=
download::DOWNLOAD_DANGER_TYPE_SENSITIVE_CONTENT_BLOCK) { download::DOWNLOAD_DANGER_TYPE_SENSITIVE_CONTENT_BLOCK &&
model_->GetDangerType() !=
download::DOWNLOAD_DANGER_TYPE_PROMPT_FOR_SCANNING) {
auto discard_button = views::MdTextButton::Create( auto discard_button = views::MdTextButton::Create(
this, l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD)); this, l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD));
discard_button_ = AddChildView(std::move(discard_button)); discard_button_ = AddChildView(std::move(discard_button));
......
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