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

Unified Diff: chrome/browser/extensions/webstore_installer.cc

Issue 10704026: Reland DownloadItem::Observer::OnDownloadDestroyed() replaces DownloadItem::REMOVING (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months 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: chrome/browser/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index a2e304bf33e2c5428f7876ca3d1c252c482fe8ea..bc21d3391e39d4e492843088bd808bd5860fbbbb 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -285,10 +285,6 @@ void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
case DownloadItem::INTERRUPTED:
ReportFailure(kDownloadInterruptedError);
break;
- case DownloadItem::REMOVING:
- download_item_->RemoveObserver(this);
- download_item_ = NULL;
- break;
case DownloadItem::COMPLETE:
// Wait for other notifications if the download is really an extension.
if (!download_crx_util::IsExtensionDownload(*download))
@@ -300,8 +296,10 @@ void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
}
}
-void WebstoreInstaller::OnDownloadOpened(DownloadItem* download) {
+void WebstoreInstaller::OnDownloadDestructed(DownloadItem* download) {
CHECK_EQ(download_item_, download);
+ download_item_->RemoveObserver(this);
+ download_item_ = NULL;
}
void WebstoreInstaller::StartDownload(const FilePath& file) {

Powered by Google App Engine
This is Rietveld 408576698