Before deleting a profile, cancel all in-progress downloads to prevent a "Do you...
commit2e3363b6dd6220b06947e76d3c7e8acbfeef84d2
authortreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 10 Apr 2014 13:43:24 +0000 (10 13:43 +0000)
committertreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 10 Apr 2014 13:43:24 +0000 (10 13:43 +0000)
tree5745b6f0b6c133ebb1890992b484e677948d721d
parent93c0393e61f67033206f7b7d199a80fc50490443
Before deleting a profile, cancel all in-progress downloads to prevent a "Do you really want to exit Chrome" popup, which (1) is confusing because the message is not accurate, and (2) prevents a window corresponding to the deleted profile from closing, leaving it in an inconsistent state.

A UI update (warning the user that downloads will be canceled) will follow in a separate CL.

Note: I'm aware that this doesn't address crbug.com/289390 which is another way to trigger the same underlying bug. Working on it...

BUG=336725

Review URL: https://codereview.chromium.org/214523003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262970 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/download/download_service.cc
chrome/browser/download/download_service.h
chrome/browser/profiles/profile_manager.cc