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

Unified Diff: chrome/browser/extensions/extension_service.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/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index bb578e1db6ae68b13e19757e9bcfddd83cafeeee..5e0c638795ba7aae9b5eda9c47b9161e6d2dff52 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1446,10 +1446,10 @@ void ExtensionService::AddExtension(const Extension* extension) {
// TODO(jstritar): We may be able to get rid of this branch by overriding the
// default extension state to DISABLED when the --disable-extensions flag
// is set (http://crbug.com/29067).
- if (!extensions_enabled() &&
- !extension->is_theme() &&
+ if (!extensions_enabled() && !extension->is_theme() &&
extension->location() != Manifest::COMPONENT &&
- !Manifest::IsExternalLocation(extension->location())) {
+ !Manifest::IsExternalLocation(extension->location()) &&
+ !IsExtensionWhitelisted(extension->id())) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698