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

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

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month 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
Index: chrome/browser/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 49262d0d42d9fca3591ac486b2b6a0d48e259efc..c472e7c112535870f0cacb482dce7ff11cae35af 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -40,8 +40,9 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "extensions/features/features.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/api/downloads/downloads_api.h"
#endif
@@ -117,7 +118,7 @@ const char DownloadHistoryData::kKey[] =
history::DownloadRow GetDownloadRow(
content::DownloadItem* item) {
std::string by_ext_id, by_ext_name;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions::DownloadedByExtension* by_ext =
extensions::DownloadedByExtension::Get(item);
if (by_ext) {
@@ -275,7 +276,7 @@ void DownloadHistory::QueryCallback(std::unique_ptr<InfoVector> infos) {
history::ToContentDownloadDangerType(it->danger_type),
history::ToContentDownloadInterruptReason(it->interrupt_reason),
it->opened);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!it->by_ext_id.empty() && !it->by_ext_name.empty()) {
new extensions::DownloadedByExtension(
item, it->by_ext_id, it->by_ext_name);
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.cc ('k') | chrome/browser/download/download_history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698