| 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 ab242df7db48414c59601f0ceb58e31186fe7d45..4a2d8ac208854ac8890b3700f0c7cd19218a792a 100644
|
| --- a/chrome/browser/download/download_crx_util.cc
|
| +++ b/chrome/browser/download/download_crx_util.cc
|
| @@ -11,6 +11,7 @@
|
| #include "chrome/browser/extensions/webstore_installer.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| +#include "chrome/common/extensions/switch_utils.h"
|
| #include "content/public/browser/download_item.h"
|
| #include "content/public/browser/notification_service.h"
|
|
|
| @@ -50,6 +51,15 @@ void SetMockInstallUIForTesting(ExtensionInstallUI* mock_ui) {
|
| mock_install_ui_for_testing = mock_ui;
|
| }
|
|
|
| +bool ShouldOpenExtensionDownload(const DownloadItem& download_item) {
|
| + if (extensions::switch_utils::IsOffStoreInstallEnabled() ||
|
| + WebstoreInstaller::GetAssociatedApproval(download_item)) {
|
| + return true;
|
| + } else {
|
| + return false;
|
| + }
|
| +}
|
| +
|
| scoped_refptr<CrxInstaller> OpenChromeExtension(
|
| Profile* profile,
|
| const DownloadItem& download_item) {
|
|
|