Index: chrome/browser/download/download_crx_util.cc |
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc |
index a34ebecc316194cb969a4628ac65f3533cd9389d..af6cb5d3e637ee4f41b874fddd66bb6a99a63b96 100644 |
--- a/chrome/browser/download/download_crx_util.cc |
+++ b/chrome/browser/download/download_crx_util.cc |
@@ -51,9 +51,11 @@ void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui) { |
mock_install_ui_for_testing = mock_ui; |
} |
-bool ShouldOpenExtensionDownload(const DownloadItem& download_item) { |
+bool ShouldOpenExtensionDownload(ExtensionService* service, |
+ const DownloadItem& download_item) { |
if (extensions::switch_utils::IsOffStoreInstallEnabled() || |
- WebstoreInstaller::GetAssociatedApproval(download_item)) { |
+ (service && service->IsDownloadFromGallery( |
+ download_item.GetURL(), download_item.GetReferrerUrl()))) { |
return true; |
} else { |
return false; |