Index: chrome/browser/download/download_target_determiner.cc |
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc |
index e7bb16d394091497f29e49249c936900a0a26001..3060c38da3620526d69b649bdc17e53002486bd6 100644 |
--- a/chrome/browser/download/download_target_determiner.cc |
+++ b/chrome/browser/download/download_target_determiner.cc |
@@ -12,7 +12,6 @@ |
#include "chrome/browser/download/download_crx_util.h" |
#include "chrome/browser/download/download_extensions.h" |
#include "chrome/browser/download/download_prefs.h" |
-#include "chrome/browser/extensions/webstore_installer.h" |
#include "chrome/browser/history/history_service.h" |
#include "chrome/browser/history/history_service_factory.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -21,12 +20,16 @@ |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/download_interrupt_reasons.h" |
#include "extensions/common/constants.h" |
-#include "extensions/common/feature_switch.h" |
#include "grit/generated_resources.h" |
#include "net/base/filename_util.h" |
#include "net/base/mime_util.h" |
#include "ui/base/l10n/l10n_util.h" |
+#if defined(ENABLE_EXTENSIONS) |
+#include "chrome/browser/extensions/webstore_installer.h" |
+#include "extensions/common/feature_switch.h" |
+#endif |
+ |
#if defined(ENABLE_PLUGINS) |
#include "chrome/browser/plugins/plugin_prefs.h" |
#include "content/public/browser/plugin_service.h" |
@@ -762,6 +765,7 @@ bool DownloadTargetDeterminer::IsDangerousFile(PriorVisitsToReferrer visits) { |
return false; |
} |
+#if defined(ENABLE_EXTENSIONS) |
// 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. |
@@ -770,6 +774,7 @@ bool DownloadTargetDeterminer::IsDangerousFile(PriorVisitsToReferrer visits) { |
!extensions::WebstoreInstaller::GetAssociatedApproval(*download_)) { |
return true; |
} |
+#endif |
// Anything the user has marked auto-open is OK if it's user-initiated. |
if (download_prefs_->IsAutoOpenEnabledBasedOnExtension(virtual_path_) && |