diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 17:43:45 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 17:43:45 +0000 |
commit | 19420cc7453b524ec75a7f5e66141651cd7f7b76 (patch) | |
tree | aeae9b2d15642aa6df04340194e2fee625f877e0 /chrome/browser/ui/views/download | |
parent | 31770c077072c1d29f74ab105ba4246eee6c8993 (diff) | |
download | chromium_src-19420cc7453b524ec75a7f5e66141651cd7f7b76.zip chromium_src-19420cc7453b524ec75a7f5e66141651cd7f7b76.tar.gz chromium_src-19420cc7453b524ec75a7f5e66141651cd7f7b76.tar.bz2 |
Modified cancel and interrupt processing to avoid race with history.
Avoid racing with the history callback by unilaterally removing
DownloadItem from queues on cancel/interrupt. This keeps the
state<->queue correspondence cleaner, and avoids leaving things on
queues during shutdown. It might also fix 85408; we'll see :-}.
BUG=85408
TEST=
Review URL: http://codereview.chromium.org/7294013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/download')
-rw-r--r-- | chrome/browser/ui/views/download/download_item_view.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc index 41ae73d..8206c8d 100644 --- a/chrome/browser/ui/views/download/download_item_view.cc +++ b/chrome/browser/ui/views/download/download_item_view.cc @@ -654,7 +654,7 @@ void DownloadItemView::ButtonPressed( UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", base::Time::Now() - creation_time_); if (download_->IsPartialDownload()) - download_->Cancel(true); + download_->Cancel(); download_->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); // WARNING: we are deleted at this point. Don't access 'this'. } else if (sender == save_button_) { |