Chromium Code Reviews| 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()) { |
|
Randy Smith (Not in Mondays)
2013/05/21 21:40:37
(This is mostly just rambling--the final conclusio
asanka
2013/05/22 22:55:52
Noted :)
|
| // 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; |
| } |