Index: extensions/browser/extension_registry.h |
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h |
index 50f75c9b7cdb42e45cc3c14457e086d02c493345..6e8c41a598ce7c22586330bf2fe0647cb5459622 100644 |
--- a/extensions/browser/extension_registry.h |
+++ b/extensions/browser/extension_registry.h |
@@ -33,12 +33,13 @@ class ExtensionRegistry : public KeyedService { |
public: |
// Flags to pass to GetExtensionById() to select which sets to look in. |
enum IncludeFlag { |
- NONE = 0, |
- ENABLED = 1 << 0, |
- DISABLED = 1 << 1, |
- TERMINATED = 1 << 2, |
+ NONE = 0, |
not at google - send to devlin
2014/11/12 18:23:01
Did clang-format really do this? Damn :( oh well.
Mike Lerman
2014/11/12 20:58:42
git cl format - ya it did :*(
|
+ ENABLED = 1 << 0, |
+ DISABLED = 1 << 1, |
+ TERMINATED = 1 << 2, |
BLACKLISTED = 1 << 3, |
- EVERYTHING = (1 << 4) - 1, |
+ LOCKED = 1 << 4, |
+ EVERYTHING = (1 << 5) - 1, |
}; |
explicit ExtensionRegistry(content::BrowserContext* browser_context); |
@@ -63,6 +64,7 @@ class ExtensionRegistry : public KeyedService { |
const ExtensionSet& blacklisted_extensions() const { |
return blacklisted_extensions_; |
} |
+ const ExtensionSet& locked_extensions() const { return locked_extensions_; } |
// Returns a set of all installed, disabled, blacklisted, and terminated |
// extensions. |
@@ -136,6 +138,10 @@ class ExtensionRegistry : public KeyedService { |
bool AddBlacklisted(const scoped_refptr<const Extension>& extension); |
bool RemoveBlacklisted(const std::string& id); |
+ // As above, but for the locked set. |
+ bool AddLocked(const scoped_refptr<const Extension>& extension); |
+ bool RemoveLocked(const std::string& id); |
+ |
// Removes all extensions from all sets. |
void ClearAll(); |
@@ -164,6 +170,9 @@ class ExtensionRegistry : public KeyedService { |
// un-blacklisted. |
ExtensionSet blacklisted_extensions_; |
+ // Extensions that are installed and locked. |
+ ExtensionSet locked_extensions_; |
+ |
ObserverList<ExtensionRegistryObserver> observers_; |
content::BrowserContext* const browser_context_; |