Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1119)

Unified Diff: chrome/browser/download/download_target_determiner.cc

Issue 345693002: Extensions: Split extensions utility IPC messages into its own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable another test Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_) &&
« no previous file with comments | « no previous file | chrome/browser/extensions/api/image_writer_private/image_writer_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698