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

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

Issue 14958002: [Resumption 8/11] Remove intermediate files when no longer necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r201622 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
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | no next file » | 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 5dc5aa17b59f3220bc75a47090b8335bd226c7f9..08b163d32be5e9d454e59d1227a04c4afda6faca 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -389,9 +389,11 @@ DownloadItem* DownloadManagerImpl::StartDownload(
} else {
DownloadMap::iterator item_iterator = downloads_.find(id.local());
// Trying to resume an interrupted download.
- if (item_iterator == downloads_.end()) {
+ if (item_iterator == downloads_.end() ||
+ item_iterator->second->IsCancelled()) {
// If the download is no longer known to the DownloadManager, then it was
- // removed after it was resumed. Ignore.
+ // removed after it was resumed. Ignore. If the download is cancelled
+ // while resuming, then also ignore the request.
info->request_handle.CancelRequest();
return NULL;
}
« no previous file with comments | « content/browser/download/download_item_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698