Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 11640007: Make the UI an observer of downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 83c68747c42c06bcfbefc09d5d22680b45ebfcb6..4cfa3ee612ef4cd90603f7471bf023aeaafc51e7 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -452,9 +452,6 @@ DownloadItemImpl* DownloadManagerImpl::CreateSavePackageDownloadItem(
FOR_EACH_OBSERVER(Observer, observers_, OnDownloadCreated(
this, download_item));
- // TODO(asanka): Make the ui an observer.
- ShowDownloadInBrowser(download_item);
-
return download_item;
}
@@ -585,21 +582,6 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
return item;
}
-// TODO(asanka) Move into an observer.
-void DownloadManagerImpl::ShowDownloadInBrowser(DownloadItemImpl* download) {
- // The 'contents' may no longer exist if the user closed the contents before
- // we get this start completion event.
- WebContents* content = download->GetWebContents();
-
- // If the contents no longer exists, we ask the embedder to suggest another
- // contents.
- if (!content && delegate_)
- content = delegate_->GetAlternativeWebContentsToNotifyForDownload();
-
- if (content && content->GetDelegate())
- content->GetDelegate()->OnStartDownload(content, download);
-}
-
int DownloadManagerImpl::InProgressCount() const {
int count = 0;
for (DownloadMap::const_iterator it = downloads_.begin();

Powered by Google App Engine
This is Rietveld 408576698