| Index: extensions/browser/extension_registry.h
|
| diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h
|
| index c051fbb6c6564b1007e766050dfb43e83752c9d0..aedd11a434f8866ca2730c8cdbdc8a8e0e7968c5 100644
|
| --- a/extensions/browser/extension_registry.h
|
| +++ b/extensions/browser/extension_registry.h
|
| @@ -7,19 +7,28 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
|
| #include "extensions/common/extension_set.h"
|
|
|
| +namespace content {
|
| +class BrowserContext;
|
| +}
|
| +
|
| namespace extensions {
|
| class Extension;
|
|
|
| // ExtensionRegistry holds sets of the installed extensions for a given
|
| -// BrowserContext.
|
| -// TODO(jamescook): Convert this to a BrowserContextKeyedService.
|
| -class ExtensionRegistry {
|
| +// BrowserContext. An incognito browser context and its master browser context
|
| +// share a single registry.
|
| +class ExtensionRegistry : public BrowserContextKeyedService {
|
| public:
|
| ExtensionRegistry();
|
| - ~ExtensionRegistry();
|
| + virtual ~ExtensionRegistry();
|
| +
|
| + // Returns the instance for the given |browser_context|.
|
| + static ExtensionRegistry* Get(content::BrowserContext* browser_context);
|
|
|
| // NOTE: These sets are *eventually* mututally exclusive, but an extension can
|
| // appear in two sets for short periods of time.
|
| @@ -70,6 +79,9 @@ class ExtensionRegistry {
|
| void SetDisabledModificationCallback(
|
| const ExtensionSet::ModificationCallback& callback);
|
|
|
| + // BrowserContextKeyedService implementation:
|
| + virtual void Shutdown() OVERRIDE;
|
| +
|
| private:
|
| // Extensions that are installed, enabled and not terminated.
|
| ExtensionSet enabled_extensions_;
|
|
|