diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 07:02:12 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 07:02:12 +0000 |
commit | 303ac6bad2b2480e9a7ee14b238ea333a6b282da (patch) | |
tree | f8a6582f4378fd75d1e594c79a360a5d67c3267f /chrome/browser/download | |
parent | 5eac40eced02c33c62734e927dfea0fbe218e900 (diff) | |
download | chromium_src-303ac6bad2b2480e9a7ee14b238ea333a6b282da.zip chromium_src-303ac6bad2b2480e9a7ee14b238ea333a6b282da.tar.gz chromium_src-303ac6bad2b2480e9a7ee14b238ea333a6b282da.tar.bz2 |
Only cancel in-progress downloads when closing the last Browser window.
BUG=320592
Review URL: https://codereview.chromium.org/82053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_service.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc index 9df332b..a33ed163 100644 --- a/chrome/browser/download/download_service.cc +++ b/chrome/browser/download/download_service.cc @@ -128,7 +128,8 @@ void DownloadService::CancelAllDownloads() { downloads.begin(); it != downloads.end(); ++it) { - (*it)->Cancel(false); + if ((*it)->GetState() == content::DownloadItem::IN_PROGRESS) + (*it)->Cancel(false); } } } |