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

Unified Diff: chrome/browser/ui/browser_navigator.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
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 66a92f9d8a2f27a321feb9950c6c1cdcd950d602..df7d5b134d20741ade79dec636a7d4eebc931fc2 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -37,6 +37,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/features/features.h"
#if defined(USE_ASH)
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
@@ -47,7 +48,7 @@
#include "ui/aura/window.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/web_applications/web_app.h"
#include "extensions/browser/extension_registry.h"
@@ -156,7 +157,7 @@ Browser* GetBrowserForDisposition(chrome::NavigateParams* params) {
// Make a new popup window.
// Coerce app-style if |source| represents an app.
std::string app_name;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (!params->extension_app_id.empty()) {
app_name = web_app::GenerateApplicationNameFromExtensionId(
params->extension_app_id);
@@ -376,7 +377,7 @@ content::WebContents* CreateTargetContents(const chrome::NavigateParams& params,
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
BrowserNavigatorWebContentsAdoption::AttachTabHelpers(target_contents);
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions::TabHelper::FromWebContents(target_contents)->
SetExtensionAppById(params.extension_app_id);
#endif
@@ -415,7 +416,7 @@ void Navigate(NavigateParams* params) {
if (!AdjustNavigateParamsForURL(params))
return;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* extension =
extensions::ExtensionRegistry::Get(params->initiating_profile)->
enabled_extensions().GetExtensionOrAppByURL(params->url);
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/fast_unload_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698