| Index: chrome/browser/extensions/shared_module_service.h
|
| diff --git a/chrome/browser/extensions/shared_module_service.h b/chrome/browser/extensions/shared_module_service.h
|
| index c185afaac69f8e4686ee5c873210f5cbf58fc96c..283de8e97f815c7d0dc7a1e8e50ef17fd0ae243a 100644
|
| --- a/chrome/browser/extensions/shared_module_service.h
|
| +++ b/chrome/browser/extensions/shared_module_service.h
|
| @@ -7,7 +7,8 @@
|
|
|
| #include <list>
|
|
|
| -#include "chrome/browser/extensions/install_observer.h"
|
| +#include "base/scoped_observer.h"
|
| +#include "extensions/browser/extension_registry_observer.h"
|
| #include "extensions/common/manifest_handlers/shared_module_info.h"
|
|
|
| namespace content {
|
| @@ -15,11 +16,11 @@ class BrowserContext;
|
| }
|
|
|
| namespace extensions {
|
| -
|
| class Extension;
|
| class ExtensionSet;
|
| +class ExtensionRegistry;
|
|
|
| -class SharedModuleService : public InstallObserver {
|
| +class SharedModuleService : public ExtensionRegistryObserver {
|
| public:
|
| enum ImportStatus {
|
| // No imports needed.
|
| @@ -41,32 +42,29 @@ class SharedModuleService : public InstallObserver {
|
| // in |missing_modules|, and imports that are out of date are stored in
|
| // |outdated_modules|.
|
| ImportStatus CheckImports(
|
| - const extensions::Extension* extension,
|
| + const Extension* extension,
|
| std::list<SharedModuleInfo::ImportInfo>* missing_modules,
|
| std::list<SharedModuleInfo::ImportInfo>* outdated_modules);
|
|
|
| // Checks an extension's shared module imports to see if they are satisfied.
|
| // If they are not, this function adds the dependencies to the pending install
|
| // list if |extension| came from the webstore.
|
| - ImportStatus SatisfyImports(const extensions::Extension* extension);
|
| + ImportStatus SatisfyImports(const Extension* extension);
|
|
|
| private:
|
| // Returns a set of extensions that import a given extension.
|
| scoped_ptr<const ExtensionSet> GetDependentExtensions(
|
| const Extension* extension);
|
|
|
| - // Uninstalls shared modules that were only referenced by |extension|.
|
| - void PruneSharedModulesOnUninstall(const Extension* extension);
|
| + // ExtensionRegistryObserver implementation.
|
| + virtual void OnExtensionUninstalled(content::BrowserContext* browser_context,
|
| + const Extension* extension) OVERRIDE;
|
|
|
| - // InstallObserver implementation:
|
| - virtual void OnExtensionUninstalled(const Extension* extension) OVERRIDE;
|
| - virtual void OnShutdown() OVERRIDE;
|
| + ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
|
| + extension_registry_observer_;
|
|
|
| // The context associated with this SharedModuleService.
|
| - content::BrowserContext* context_;
|
| -
|
| - // Whether or not we are actively observing installs.
|
| - bool observing_;
|
| + content::BrowserContext* browser_context_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SharedModuleService);
|
| };
|
|
|