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

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: Fix UMA and support stealing interrupted downloads 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 08b163d32be5e9d454e59d1227a04c4afda6faca..60a1901fd4e16c66d54f0b9b23b43282066c365b 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -344,19 +344,8 @@ void DownloadManagerImpl::Shutdown() {
// associative containers such as sets.
it++;
Randy Smith (Not in Mondays) 2013/05/28 17:29:40 We're no longer removing downloads here, so would
asanka 2013/05/28 22:01:39 Done.
- 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);
Randy Smith (Not in Mondays) 2013/05/28 17:29:40 There's a semantic difference we're putting in whi
asanka 2013/05/28 22:01:39 Yeah. I updated the CL description to mention this
- } else if (download->IsPartialDownload()) {
+ if (download->GetState() == DownloadItem::IN_PROGRESS)
download->Cancel(false);
- }
}
// At this point, all dangerous downloads have had their files removed

Powered by Google App Engine
This is Rietveld 408576698