DownloadTargetDeterminer partly bases the danger type of a download on the ui::PageTransition type of the navigation that resulted in the download. The test is implemented as:
if (danger_level == DownloadFileType::ALLOW_ON_USER_GESTURE &&
(ui::PageTransitionTypeIncludingQualifiersIs(
download_->GetTransitionType(),
ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) ||
(download_->HasUserGesture() && visits == VISITED_REFERRER)))
return DownloadFileType::NOT_DANGEROUS;
However the ui::PageTransitionTypeIncludingQualifiersIs(..., ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) test is incorrect. PAGE_TRANSITION_FROM_ADDRESS_BAR is a bit mask that is used as a qualifier accompanying the core page transition type.
Comment 1 by bugdroid1@chromium.org
, Jul 5 2016