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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.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/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 1a8e8d8e4c7a238dfbb86e0ce28a8c2518b0bfa2..4d435553df7d2324c07d9604fe5db3fdbc4e3555 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -79,6 +79,7 @@
#include "content/public/browser/web_ui.h"
#include "content/public/common/content_client.h"
#include "content/public/common/url_utils.h"
+#include "extensions/features/features.h"
#include "printing/features/features.h"
#include "ui/gfx/favicon_size.h"
#include "ui/web_dialogs/web_dialog_ui.h"
@@ -187,7 +188,7 @@
#include "chrome/browser/ui/webui/app_list/start_page_ui.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_web_ui.h"
#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -577,7 +578,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
if (url.host() == chrome::kChromeUIAppListStartPageHost)
return &NewWebUI<app_list::StartPageUI>;
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (url.host() == chrome::kChromeUIExtensionsFrameHost)
return &NewWebUI<extensions::ExtensionsUI>;
#endif
@@ -683,7 +684,7 @@ void ChromeWebUIControllerFactory::GetFaviconForURL(
// overrides. This changes urls in |kChromeUIScheme| to extension urls, and
// allows to use ExtensionWebUI::GetFaviconForURL.
GURL url(page_url);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
ExtensionWebUI::HandleChromeURLOverride(&url, profile);
// All extensions but the bookmark manager get their favicon from the icons
@@ -806,7 +807,7 @@ base::RefCountedMemory* ChromeWebUIControllerFactory::GetFaviconResourceBytes(
page_url.host() == chrome::kChromeUIMdSettingsHost)
return settings_utils::GetFaviconResourceBytes(scale_factor);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (page_url.host() == chrome::kChromeUIExtensionsHost ||
page_url.host() == chrome::kChromeUIExtensionsFrameHost)
return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor);
« no previous file with comments | « chrome/browser/ui/webui/browsing_history_handler.cc ('k') | chrome/browser/ui/webui/constrained_web_dialog_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698