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

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

Issue 14947007: [Downloads] Allow acquiring dangerous download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename methods and get rid of Delete() Created 7 years, 7 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
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 5dc5aa17b59f3220bc75a47090b8335bd226c7f9..1c2c5f3f14acf074ef0459007fc0afcba9594ab1 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -344,19 +344,7 @@ void DownloadManagerImpl::Shutdown() {
// associative containers such as sets.
it++;
- if (download->IsDangerous() && download->IsPartialDownload()) {
- // The user hasn't accepted it, so we need to remove it
- // from the disk. This may or may not result in it being
- // removed from the DownloadManager queues and deleted
- // (specifically, DownloadManager::DownloadRemoved only
- // removes and deletes it if it's known to the history service)
- // so the only thing we know after calling this function is that
- // the download was deleted if-and-only-if it was removed
- // from all queues.
- download->Delete(DownloadItem::DELETE_DUE_TO_BROWSER_SHUTDOWN);
- } else if (download->IsPartialDownload()) {
- download->Cancel(false);
- }
+ download->Cancel(false);
}
// At this point, all dangerous downloads have had their files removed

Powered by Google App Engine
This is Rietveld 408576698