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

Unified Diff: chrome/browser/extensions/extension_service.h

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.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 556cc4f388d1cf775eb14147623418b4c4d5afd5..55095502c7d0acb24b9618fcbf93110593881e6b 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -456,6 +456,14 @@ class ExtensionService
external_updates_finished_callback_ = callback;
}
+ void AddExtensionToWhitelist(const std::string& extensionId) {
+ whitelist_.insert(extensionId);
+ }
+
+ bool IsExtensionWhitelisted(const std::string& extensionId) {
+ return whitelist_.find(extensionId) != whitelist_.end();
+ }
+
private:
// Reloads the specified extension, sending the onLaunched() event to it if it
// currently has any window showing. |be_noisy| determines whether noisy
@@ -616,6 +624,9 @@ class ExtensionService
// These extensions should appear in registry_.
extensions::ExtensionSet greylist_;
+ // Set of whitelisted extensions.
+ std::set<std::string> whitelist_;
Devlin 2016/07/25 19:10:29 Whitelisted for what?
catmullings 2016/07/27 01:29:45 WDYT of enabled_extensions_whitelist_ ? I could b
Devlin 2016/07/27 17:00:59 enabled_extensions_whitelist still sounds a little
catmullings 2016/08/04 22:59:30 Done.
catmullings 2016/08/04 22:59:30 I like disable_flag_exempted_extensions_. I'll go
+
// The list of extension installs delayed for various reasons. The reason
// for delayed install is stored in ExtensionPrefs. These are not part of
// ExtensionRegistry because they are not yet installed.

Powered by Google App Engine
This is Rietveld 408576698