| Index: chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc
|
| diff --git a/chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc b/chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc
|
| index cec27721ada6b8e745d4ecb207723e1eba669935..71420a95d918bc74d8ad87a33c2c95ab353e9e9f 100644
|
| --- a/chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc
|
| +++ b/chrome/browser/ui/cocoa/download/download_danger_prompt_impl.cc
|
| @@ -20,6 +20,7 @@
|
| #include "url/gurl.h"
|
|
|
| using extensions::ExperienceSamplingEvent;
|
| +using safe_browsing::ClientSafeBrowsingReportRequest;
|
|
|
| namespace {
|
|
|
| @@ -57,6 +58,9 @@ class DownloadDangerPromptImpl : public DownloadDangerPrompt,
|
| void RunDone(Action action);
|
|
|
| content::DownloadItem* download_;
|
| + // show_context_ is true, this is a comfirming download dialog (through
|
| + // download API), otherwise it is download recovery dialog from a regular
|
| + // download.
|
| bool show_context_;
|
| OnDone done_;
|
|
|
| @@ -250,7 +254,11 @@ void DownloadDangerPromptImpl::RunDone(Action action) {
|
| RecordDownloadDangerPrompt(accept, *download_);
|
| if (!download_->GetURL().is_empty() &&
|
| !download_->GetBrowserContext()->IsOffTheRecord()) {
|
| - SendSafeBrowsingDownloadRecoveryReport(accept, *download_);
|
| + ClientSafeBrowsingReportRequest::ReportType report_type
|
| + = show_context_ ?
|
| + ClientSafeBrowsingReportRequest::DANGEROUS_DOWNLOAD_BY_API :
|
| + ClientSafeBrowsingReportRequest::DANGEROUS_DOWNLOAD_RECOVERY;
|
| + SendSafeBrowsingDownloadReport(report_type, accept, *download_);
|
| }
|
| }
|
| download_->RemoveObserver(this);
|
|
|