summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/drag_download_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/drag_download_file.cc')
-rw-r--r--chrome/browser/download/drag_download_file.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/download/drag_download_file.cc b/chrome/browser/download/drag_download_file.cc
index e047100..261e3ec 100644
--- a/chrome/browser/download/drag_download_file.cc
+++ b/chrome/browser/download/drag_download_file.cc
@@ -167,23 +167,17 @@ void DragDownloadFile::ModelChanged() {
void DragDownloadFile::OnDownloadUpdated(DownloadItem* download) {
AssertCurrentlyOnUIThread();
-
if (download->IsCancelled()) {
download->RemoveObserver(this);
download_manager_->RemoveObserver(this);
DownloadCompleted(false);
+ } else if (download->IsComplete()) {
+ download->RemoveObserver(this);
+ download_manager_->RemoveObserver(this);
+ DownloadCompleted(true);
}
-}
-
-void DragDownloadFile::OnDownloadFileCompleted(DownloadItem* download) {
- AssertCurrentlyOnUIThread();
- DCHECK(download->IsComplete());
-
- download->RemoveObserver(this);
- download_manager_->RemoveObserver(this);
-
- DownloadCompleted(true);
+ // Ignore other states.
}
void DragDownloadFile::AssertCurrentlyOnDragThread() {