| Index: chrome/browser/ui/views/download/download_danger_prompt_views.cc
|
| diff --git a/chrome/browser/ui/views/download/download_danger_prompt_views.cc b/chrome/browser/ui/views/download/download_danger_prompt_views.cc
|
| index ef7bbfbb06f7c2abbb1c223fa115c6cfe3418899..cef28d1058a43507a51f3bcc3f50c83e796b339b 100644
|
| --- a/chrome/browser/ui/views/download/download_danger_prompt_views.cc
|
| +++ b/chrome/browser/ui/views/download/download_danger_prompt_views.cc
|
| @@ -2,13 +2,15 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "base/compiler_specific.h"
|
| #include "chrome/browser/download/download_danger_prompt.h"
|
| +
|
| +#include "base/compiler_specific.h"
|
| #include "chrome/browser/download/download_stats.h"
|
| #include "chrome/browser/extensions/api/experience_sampling_private/experience_sampling.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| #include "chrome/grit/generated_resources.h"
|
| #include "components/constrained_window/constrained_window_views.h"
|
| +#include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/download_danger_type.h"
|
| #include "content/public/browser/download_item.h"
|
| @@ -21,6 +23,7 @@
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/window/dialog_client_view.h"
|
| #include "ui/views/window/dialog_delegate.h"
|
| +#include "url/gurl.h"
|
|
|
| using extensions::ExperienceSamplingEvent;
|
|
|
| @@ -333,6 +336,11 @@ void DownloadDangerPromptViews::RunDone(Action action) {
|
| OnDone done = done_;
|
| done_.Reset();
|
| if (download_ != NULL) {
|
| + if (!download_->GetURL().is_empty() &&
|
| + !download_->GetBrowserContext()->IsOffTheRecord()) {
|
| + SendSafeBrowsingDownloadRecoveryReport(
|
| + action == DownloadDangerPrompt::ACCEPT, download_->GetURL());
|
| + }
|
| download_->RemoveObserver(this);
|
| download_ = NULL;
|
| }
|
|
|