Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3836)

Unified Diff: chrome/browser/extensions/shared_module_service.h

Issue 323763002: Remove InstallTracker's extension installed, uninstalled observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix clang error Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/install_tracker.cc ('k') | chrome/browser/extensions/shared_module_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « chrome/browser/extensions/install_tracker.cc ('k') | chrome/browser/extensions/shared_module_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698