Index: chrome/browser/download/download_item_model.cc |
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc |
index 051b9ffd2c2f14b4b12c1ed20f2b5b4dddb80bd2..dc24c1bb0d3c2185ad7a186c82a601f8585ea518 100644 |
--- a/chrome/browser/download/download_item_model.cc |
+++ b/chrome/browser/download/download_item_model.cc |
@@ -12,6 +12,7 @@ |
#include "base/time.h" |
#include "base/utf_string_conversions.h" |
#include "chrome/browser/download/download_crx_util.h" |
+#include "chrome/browser/safe_browsing/download_feedback_service.h" |
#include "chrome/common/time_format.h" |
#include "content/public/browser/download_danger_type.h" |
#include "content/public/browser/download_interrupt_reasons.h" |
@@ -393,6 +394,13 @@ bool DownloadItemModel::IsMalicious() const { |
return false; |
} |
+bool DownloadItemModel::ShouldAllowDownloadFeedback() const { |
+ if (!IsDangerous()) |
+ return false; |
+ return safe_browsing::DownloadFeedbackService::IsEnabledForDownload( |
+ *download_); |
+} |
+ |
bool DownloadItemModel::ShouldRemoveFromShelfWhenComplete() const { |
// If the download was already opened automatically, it should be removed. |
if (download_->GetAutoOpened()) |