Commit 513a888b authored by qinmin's avatar qinmin Committed by Commit bot

Record one more reason that download is canceled

Download was cancelled when a dangerous download infobar is dismissed.
We missed it in the previous CL.

BUG=618864

Review-Url: https://codereview.chromium.org/2111983002
Cr-Commit-Position: refs/heads/master@{#403274}
parent bbf1ae25
......@@ -424,8 +424,11 @@ void DownloadController::DangerousDownloadValidated(
DownloadItem* item = dlm->GetDownloadByGuid(download_guid);
if (!item)
return;
if (accept)
if (accept) {
item->ValidateDangerousDownload();
else
} else {
DownloadController::RecordDownloadCancelReason(
DownloadController::CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED);
item->Remove();
}
}
......@@ -59,6 +59,7 @@ class DownloadController : public DownloadControllerBase {
CANCEL_REASON_NOTIFICATION_DISMISSED,
CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED,
CANCEL_REASON_NO_STORAGE_PERMISSION,
CANCEL_REASON_DANGEROUS_DOWNLOAD_INFOBAR_DISMISSED,
CANCEL_REASON_MAX
};
static void RecordDownloadCancelReason(DownloadCancelReason reason);
......
......@@ -82706,6 +82706,7 @@ To add a new entry, add it with any value and run test to compute valid value.
<int value="2" label="Notification dismissed"/>
<int value="3" label="Overwrite infobar dismissed"/>
<int value="4" label="No storage permission"/>
<int value="5" label="Dangerous download infobar dismissed"/>
</enum>
<enum name="MobileDownloadInterceptFailureReason" type="int">
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