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..aed1cb19083eaf649110025134002b941eef53c7 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -456,6 +456,15 @@ class ExtensionService |
external_updates_finished_callback_ = callback; |
} |
+ void AddExtensionToWhitelist(const std::string& extensionId) { |
Devlin
2016/07/27 17:00:59
"Whitelist" here is still pretty vague. But this
catmullings
2016/08/04 22:59:30
Done.
|
+ enabled_extensions_whitelist_.insert(extensionId); |
+ } |
+ |
+ bool IsExtensionWhitelisted(const std::string& extensionId) { |
+ return enabled_extensions_whitelist_.find(extensionId) != |
+ enabled_extensions_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 +625,10 @@ class ExtensionService |
// These extensions should appear in registry_. |
extensions::ExtensionSet greylist_; |
+ // Set of whitelisted enabled extensions loaded from the |
+ // --disable-extensions-except command line flag. |
+ std::set<std::string> enabled_extensions_whitelist_; |
+ |
// 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. |