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

Unified Diff: chrome/common/chrome_content_client.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/common/DEPS ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index dca409a6830e423119a9560b524a2cc89a9f3d47..bb7757be6f4bd49eb473ea78b7e1bf77eab7a78b 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -41,6 +41,7 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/user_agent.h"
#include "extensions/common/constants.h"
+#include "extensions/features/features.h"
#include "gpu/config/gpu_info.h"
#include "net/http/http_util.h"
#include "ppapi/features/features.h"
@@ -65,7 +66,7 @@
#include "components/nacl/common/nacl_sandbox_type.h"
#endif
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/extensions/extension_process_policy.h"
#include "extensions/common/features/feature_util.h"
#endif
@@ -657,7 +658,7 @@ void ChromeContentClient::AddSecureSchemesAndOrigins(
void ChromeContentClient::AddServiceWorkerSchemes(
std::set<std::string>* schemes) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
if (extensions::feature_util::ExtensionServiceWorkersEnabled())
schemes->insert(extensions::kExtensionScheme);
#endif
@@ -665,7 +666,7 @@ void ChromeContentClient::AddServiceWorkerSchemes(
bool ChromeContentClient::AllowScriptExtensionForServiceWorker(
const GURL& script_url) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
return script_url.SchemeIs(extensions::kExtensionScheme) ||
script_url.SchemeIs(extensions::kExtensionResourceScheme);
#else
@@ -674,7 +675,7 @@ bool ChromeContentClient::AllowScriptExtensionForServiceWorker(
}
bool ChromeContentClient::IsSupplementarySiteIsolationModeEnabled() {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
return extensions::IsIsolateExtensionsEnabled();
#else
return false;
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/chrome_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698