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

Unified Diff: chrome/browser/task_manager/web_contents_tags.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/task_manager/web_contents_tags.cc
diff --git a/chrome/browser/task_manager/web_contents_tags.cc b/chrome/browser/task_manager/web_contents_tags.cc
index 0a4f9240ae069d8e4a2e7c78343b1d9204ec397f..8352b7bd681184f322ccaded61bd593a75ad51b1 100644
--- a/chrome/browser/task_manager/web_contents_tags.cc
+++ b/chrome/browser/task_manager/web_contents_tags.cc
@@ -15,9 +15,10 @@
#include "components/guest_view/browser/guest_view_base.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/view_type_utils.h"
+#include "extensions/features/features.h"
#include "printing/features/features.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/process_manager.h"
#endif
@@ -39,7 +40,7 @@ void TagWebContents(content::WebContents* contents,
WebContentsTagsManager::GetInstance()->AddTag(tag);
}
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
bool IsExtensionWebContents(content::WebContents* contents) {
DCHECK(contents);
@@ -53,7 +54,7 @@ bool IsExtensionWebContents(content::WebContents* contents) {
view_type != extensions::VIEW_TYPE_BACKGROUND_CONTENTS);
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
} // namespace
#endif // defined(ENABLE_TASK_MANAGER)
@@ -135,7 +136,7 @@ void WebContentsTags::CreateForGuestContents(
// static
void WebContentsTags::CreateForExtension(content::WebContents* web_contents,
extensions::ViewType view_type) {
-#if defined(ENABLE_TASK_MANAGER) && defined(ENABLE_EXTENSIONS)
+#if defined(ENABLE_TASK_MANAGER) && BUILDFLAG(ENABLE_EXTENSIONS)
DCHECK(IsExtensionWebContents(web_contents));
if (!WebContentsTag::FromWebContents(web_contents)) {
@@ -143,7 +144,7 @@ void WebContentsTags::CreateForExtension(content::WebContents* web_contents,
new ExtensionTag(web_contents, view_type),
WebContentsTag::kTagKey);
}
-#endif // defined(ENABLE_TASK_MANAGER) && defined(ENABLE_EXTENSIONS)
+#endif // defined(ENABLE_TASK_MANAGER) && BUILDFLAG(ENABLE_EXTENSIONS)
}
// static
« no previous file with comments | « chrome/browser/task_manager/providers/web_contents/extension_tag.cc ('k') | chrome/browser/themes/theme_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698