| Index: chrome/browser/extensions/webstore_installer.cc
|
| diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
|
| index c8975d123f5503927cb7dfb06977cfd160e75165..f2fcd90cb64b18702947d35ecf434d033a7b8256 100644
|
| --- a/chrome/browser/extensions/webstore_installer.cc
|
| +++ b/chrome/browser/extensions/webstore_installer.cc
|
| @@ -167,7 +167,7 @@ WebstoreInstaller::Approval::~Approval() {}
|
|
|
| const WebstoreInstaller::Approval* WebstoreInstaller::GetAssociatedApproval(
|
| const DownloadItem& download) {
|
| - return static_cast<const Approval*>(download.GetExternalData(kApprovalKey));
|
| + return static_cast<const Approval*>(download.GetUserData(kApprovalKey));
|
| }
|
|
|
| WebstoreInstaller::WebstoreInstaller(Profile* profile,
|
| @@ -282,7 +282,7 @@ void WebstoreInstaller::OnDownloadStarted(DownloadId id, net::Error error) {
|
| download_item_ = download_manager->GetActiveDownloadItem(id.local());
|
| download_item_->AddObserver(this);
|
| if (approval_.get())
|
| - download_item_->SetExternalData(kApprovalKey, approval_.release());
|
| + download_item_->SetUserData(kApprovalKey, approval_.release());
|
| }
|
|
|
| void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
|
| @@ -295,10 +295,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))
|
| @@ -310,8 +306,10 @@ void WebstoreInstaller::OnDownloadUpdated(DownloadItem* download) {
|
| }
|
| }
|
|
|
| -void WebstoreInstaller::OnDownloadOpened(DownloadItem* download) {
|
| +void WebstoreInstaller::OnDownloadDestroyed(DownloadItem* download) {
|
| CHECK_EQ(download_item_, download);
|
| + download_item_->RemoveObserver(this);
|
| + download_item_ = NULL;
|
| }
|
|
|
| void WebstoreInstaller::StartDownload(const FilePath& file) {
|
|
|