Index: extensions/browser/extension_registry.h |
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h |
index aedd11a434f8866ca2730c8cdbdc8a8e0e7968c5..2a3e8e808d3554baaa0ec11a917d5034fbfacaaf 100644 |
--- a/extensions/browser/extension_registry.h |
+++ b/extensions/browser/extension_registry.h |
@@ -24,6 +24,15 @@ class Extension; |
// share a single registry. |
class ExtensionRegistry : public BrowserContextKeyedService { |
public: |
+ enum IncludeFlag { |
+ INCLUDE_NONE = 0, |
+ INCLUDE_ENABLED = 1 << 0, |
+ INCLUDE_DISABLED = 1 << 1, |
+ INCLUDE_TERMINATED = 1 << 2, |
+ INCLUDE_BLACKLISTED = 1 << 3, |
+ INCLUDE_EVERYTHING = (1 << 4) - 1, |
+ }; |
+ |
ExtensionRegistry(); |
virtual ~ExtensionRegistry(); |
@@ -45,6 +54,14 @@ class ExtensionRegistry : public BrowserContextKeyedService { |
return blacklisted_extensions_; |
} |
+ // Look up an extension by ID, selecting which sets to look in: |
+ // * enabled_extensions() --> INCLUDE_ENABLED |
+ // * disabled_extensions() --> INCLUDE_DISABLED |
+ // * terminated_extensions() --> INCLUDE_TERMINATED |
+ // * blacklisted_extensions() --> INCLUDE_BLACKLISTED |
+ const Extension* GetExtensionById(const std::string& id, |
+ int include_mask) const; |
+ |
// Adds the specified extension to the enabled set. The registry becomes an |
// owner. Any previous extension with the same ID is removed. |
// Returns true if there is no previous extension. |