Merge pull request #8678 from liusy182/download-item
only emit `download-item done` event once
This commit is contained in:
commit
479af3c9e2
1 changed files with 0 additions and 2 deletions
|
@ -78,7 +78,6 @@ DownloadItem::~DownloadItem() {
|
|||
void DownloadItem::OnDownloadUpdated(content::DownloadItem* item) {
|
||||
if (download_item_->IsDone()) {
|
||||
Emit("done", item->GetState());
|
||||
|
||||
// Destroy the item once item is downloaded.
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, GetDestroyClosure());
|
||||
|
@ -111,7 +110,6 @@ bool DownloadItem::CanResume() const {
|
|||
|
||||
void DownloadItem::Cancel() {
|
||||
download_item_->Cancel(true);
|
||||
download_item_->Remove();
|
||||
}
|
||||
|
||||
int64_t DownloadItem::GetReceivedBytes() const {
|
||||
|
|
Loading…
Reference in a new issue