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

Unified Diff: chrome/common/chrome_switches.cc

Issue 2166513002: Create --disable-extensions-except switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test Created 4 years, 5 months 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/common/chrome_switches.cc
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index a125d337c7edd38610435a2ba76f5d90e21ad662..45c039f8e27dd89491b519e08605b45e54247259 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -238,6 +238,9 @@ const char kDisableDownloadNotification[] = "disable-download-notification";
// Disable extensions.
const char kDisableExtensions[] = "disable-extensions";
+// Disable extensions except those specified in a comma-separated list.
+const char kDisableExtensionsExcept[] = "disable-extensions-except";
+
// Disable checking for user opt-in for extensions that want to inject script
// into file URLs (ie, always allow it). This is used during automated testing.
const char kDisableExtensionsFileAccessCheck[] =
@@ -1300,6 +1303,13 @@ bool AboutInSettingsEnabled() {
::switches::kDisableAboutInSettings);
}
+bool ExtensionsDisabled() {
+ return base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kDisableExtensions) ||
+ base::CommandLine::ForCurrentProcess()->HasSwitch(
+ ::switches::kDisableExtensionsExcept);
+}
+
bool MdExtensionsEnabled() {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableMaterialDesignExtensions);
« chrome/browser/extensions/extension_system_impl.cc ('K') | « chrome/common/chrome_switches.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698