Commit c4f02c4b authored by rdsmith@chromium.org's avatar rdsmith@chromium.org

Check for cancel in DownloadManager::OnAllDataSaved().

BUG=70592
TEST=All downloads tests pass

Review URL: http://codereview.chromium.org/6327016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72395 0039d316-1c4b-4281-b951-d872f2087c98
parent 0c857214
......@@ -509,7 +509,11 @@ void DownloadManager::OnAllDataSaved(int32 download_id, int64 size) {
VLOG(20) << __FUNCTION__ << "()" << " download_id = " << download_id
<< " size = " << size;
DCHECK_EQ(1U, active_downloads_.count(download_id));
// If it's not in active_downloads_, that means it was cancelled; just
// ignore the notification.
if (active_downloads_.count(download_id) == 0)
return;
DownloadItem* download = active_downloads_[download_id];
download->OnAllDataSaved(size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment