Index: chrome/browser/download/chrome_download_manager_delegate.cc |
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc |
index aad682d4223cd4d2e37818650076bf29d110ef4b..7ea012614da3f38aa009bc963b0b61fcf7e453f1 100644 |
--- a/chrome/browser/download/chrome_download_manager_delegate.cc |
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
@@ -301,28 +301,23 @@ bool ChromeDownloadManagerDelegate::ShouldCompleteDownload( |
bool ChromeDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) { |
if (IsExtensionDownload(item)) { |
- // We can open extensions if either they came from the store, or |
- // off-store-install is enabled. |
- if (extensions::switch_utils::IsOffStoreInstallEnabled() || |
Aaron Boodman
2012/05/24 09:08:53
Removing this allows us to get further into the in
|
- WebstoreInstaller::GetAssociatedApproval(*item)) { |
- scoped_refptr<CrxInstaller> crx_installer = |
- download_crx_util::OpenChromeExtension(profile_, *item); |
- |
- // CRX_INSTALLER_DONE will fire when the install completes. Observe() |
- // will call DelayedDownloadOpened() on this item. If this DownloadItem |
- // is not around when CRX_INSTALLER_DONE fires, Complete() will not be |
- // called. |
- registrar_.Add(this, |
- chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
- content::Source<CrxInstaller>(crx_installer.get())); |
- |
- crx_installers_[crx_installer.get()] = item->GetId(); |
- // The status text and percent complete indicator will change now |
- // that we are installing a CRX. Update observers so that they pick |
- // up the change. |
- item->UpdateObservers(); |
- return false; |
- } |
+ scoped_refptr<CrxInstaller> crx_installer = |
+ download_crx_util::OpenChromeExtension(profile_, *item); |
+ |
+ // CRX_INSTALLER_DONE will fire when the install completes. Observe() |
+ // will call DelayedDownloadOpened() on this item. If this DownloadItem |
+ // is not around when CRX_INSTALLER_DONE fires, Complete() will not be |
+ // called. |
+ registrar_.Add(this, |
+ chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
+ content::Source<CrxInstaller>(crx_installer.get())); |
+ |
+ crx_installers_[crx_installer.get()] = item->GetId(); |
+ // The status text and percent complete indicator will change now |
+ // that we are installing a CRX. Update observers so that they pick |
+ // up the change. |
+ item->UpdateObservers(); |
+ return false; |
} |
if (ShouldOpenWithWebIntents(item)) { |
@@ -743,7 +738,7 @@ bool ChromeDownloadManagerDelegate::IsDangerousFile( |
// Extensions that are not from the gallery are considered dangerous. |
// When off-store install is disabled we skip this, since in this case, we |
- // will not offer to install the extension. |
+ // will cancel the install later. |
if (extensions::switch_utils::IsOffStoreInstallEnabled() && |
IsExtensionDownload(&download) && |
!WebstoreInstaller::GetAssociatedApproval(download)) { |