Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 26938003: Don't prompt to save malicious downloads on exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unneeded code Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &&
+ 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;
}
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698