Index: content/browser/download/download_manager_impl.cc |
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc |
index ad60f8660ed428fb6114bd023e8d91601c4f13d9..c5c3b367ee6f8bb85eaea5d591aadcaf0eef88df 100644 |
--- a/content/browser/download/download_manager_impl.cc |
+++ b/content/browser/download/download_manager_impl.cc |
@@ -673,6 +673,20 @@ int DownloadManagerImpl::InProgressCount() const { |
return count; |
} |
+int DownloadManagerImpl::NonMaliciousInProgressCount() const { |
+ int count = 0; |
+ for (DownloadMap::const_iterator it = downloads_.begin(); |
+ it != downloads_.end(); ++it) { |
+ if (it->second->GetState() == DownloadItem::IN_PROGRESS && |
+ it->second->GetDangerType() != DOWNLOAD_DANGER_TYPE_DANGEROUS_URL && |
felt
2013/10/18 01:50:54
pkasting: changed to this, to address your concern
|
+ it->second->GetDangerType() != DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT && |
+ it->second->GetDangerType() != DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST) { |
+ ++count; |
+ } |
+ } |
+ return count; |
+} |
+ |
DownloadItem* DownloadManagerImpl::GetDownload(uint32 download_id) { |
return ContainsKey(downloads_, download_id) ? downloads_[download_id] : NULL; |
} |