From 303ac6bad2b2480e9a7ee14b238ea333a6b282da Mon Sep 17 00:00:00 2001 From: "sammc@chromium.org" Date: Fri, 22 Nov 2013 07:02:12 +0000 Subject: [PATCH] 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 --- chrome/browser/download/download_service.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/browser/download/download_service.cc b/chrome/browser/download/download_service.cc index 9df332b78772..a33ed1633b59 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); } } } -- 2.11.4.GIT