Chromium Code Reviews| Index: content/browser/download/download_item_impl.cc |
| diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc |
| index c2c6941a288990af490387f7e0941cc3ddb7ab59..3e8e4cd840066823e7f5b01a14f5b6bac2063b4d 100644 |
| --- a/content/browser/download/download_item_impl.cc |
| +++ b/content/browser/download/download_item_impl.cc |
| @@ -86,8 +86,6 @@ const char* DebugDownloadStateString(DownloadItem::DownloadState state) { |
| return "COMPLETE"; |
| case DownloadItem::CANCELLED: |
| return "CANCELLED"; |
| - case DownloadItem::REMOVING: |
| - return "REMOVING"; |
| case DownloadItem::INTERRUPTED: |
| return "INTERRUPTED"; |
| default: |
| @@ -316,11 +314,9 @@ DownloadItemImpl::DownloadItemImpl(Delegate* delegate, |
| DownloadItemImpl::~DownloadItemImpl() { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - |
| - TransitionTo(REMOVING); |
| + FOR_EACH_OBSERVER(Observer, observers_, OnDownloadDestructed(this)); |
|
Randy Smith (Not in Mondays)
2012/06/29 19:34:54
nit, suggestion: Destroyed.
benjhayden
2012/07/10 16:58:57
Done.
|
| STLDeleteContainerPairSecondPointers( |
| external_data_map_.begin(), external_data_map_.end()); |
| - delegate_->AssertStateConsistent(this); |
|
Randy Smith (Not in Mondays)
2012/06/29 19:34:54
Why? I could imagine us yanking out the queue sta
benjhayden
2012/07/10 16:58:57
Done.
|
| delegate_->Detach(); |
| } |
| @@ -658,7 +654,7 @@ void DownloadItemImpl::Remove() { |
| Cancel(true); |
| delegate_->AssertStateConsistent(this); |
| - TransitionTo(REMOVING); |
| + FOR_EACH_OBSERVER(Observer, observers_, OnDownloadRemoved(this)); |
|
Randy Smith (Not in Mondays)
2012/06/29 19:34:54
I'm torn about this. This *does* seem like a stat
benjhayden
2012/07/10 16:58:57
When we talked about this, we were talking about t
|
| delegate_->DownloadRemoved(this); |
| // We have now been deleted. |
| } |