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 9af11e698d82f8eb1f78272b25964b9e0d5d3d83..bce81648e9dd7d2ff6e35be16cde7e780bacbfed 100644 |
--- a/chrome/browser/download/chrome_download_manager_delegate.cc |
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
@@ -52,6 +52,7 @@ |
#include "content/public/browser/download_manager.h" |
#include "content/public/browser/notification_source.h" |
#include "content/public/browser/page_navigator.h" |
+#include "extensions/features/features.h" |
#include "net/base/filename_util.h" |
#include "net/base/mime_util.h" |
#include "ui/base/l10n/l10n_util.h" |
@@ -66,7 +67,7 @@ |
#include "chrome/browser/chromeos/drive/file_system_util.h" |
#endif |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
#include "chrome/browser/extensions/api/downloads/downloads_api.h" |
#include "chrome/browser/extensions/crx_installer.h" |
#include "chrome/browser/extensions/webstore_installer.h" |
@@ -288,7 +289,7 @@ bool ChromeDownloadManagerDelegate::ShouldOpenFileBasedOnExtension( |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
if (path.Extension().empty()) |
return false; |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
// TODO(asanka): This determination is done based on |path|, while |
// ShouldOpenDownload() detects extension downloads based on the |
// characteristics of the download. Reconcile this. http://crbug.com/167702 |
@@ -384,7 +385,7 @@ bool ChromeDownloadManagerDelegate::ShouldCompleteDownload( |
bool ChromeDownloadManagerDelegate::ShouldOpenDownload( |
DownloadItem* item, const content::DownloadOpenDelayedCallback& callback) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
if (download_crx_util::IsExtensionDownload(*item) && |
!extensions::WebstoreInstaller::GetAssociatedApproval(*item)) { |
scoped_refptr<extensions::CrxInstaller> crx_installer = |
@@ -569,7 +570,7 @@ void ChromeDownloadManagerDelegate::NotifyExtensions( |
const base::FilePath& virtual_path, |
const NotifyExtensionsCallback& callback) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
extensions::ExtensionDownloadsEventRouter* router = |
DownloadServiceFactory::GetForBrowserContext(profile_) |
->GetExtensionEventRouter(); |
@@ -751,7 +752,7 @@ void ChromeDownloadManagerDelegate::Observe( |
int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
-#if defined(ENABLE_EXTENSIONS) |
+#if BUILDFLAG(ENABLE_EXTENSIONS) |
DCHECK_EQ(extensions::NOTIFICATION_CRX_INSTALLER_DONE, type); |
registrar_.Remove(this, extensions::NOTIFICATION_CRX_INSTALLER_DONE, source); |