Commit 38a224c7 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Allow user validated downloads to complete before Safe Browsing does

Download that are prompting the user for an Advanced Protection scan
can be kept from the chrome://downloads page. Previously, these did not
complete, since the Safe Browsing scan had not finished yet. Allow
these to complete.

Bug: 1048197
Change-Id: I774ed755fd170579027cb60165e12743f87baad2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031716
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737848}
parent d2d4b6a6
......@@ -521,7 +521,9 @@ bool ChromeDownloadManagerDelegate::IsDownloadReadyForCompletion(
state->CompleteDownload();
return false;
}
} else if (!state->is_complete()) {
} else if (!state->is_complete() &&
item->GetDangerType() !=
download::DOWNLOAD_DANGER_TYPE_USER_VALIDATED) {
// Don't complete the download until we have an answer.
state->set_callback(std::move(internal_complete_callback));
return false;
......
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