Index: chrome/browser/extensions/install_tracker.cc |
diff --git a/chrome/browser/extensions/install_tracker.cc b/chrome/browser/extensions/install_tracker.cc |
index 81e72feded968487972f0656a1e7e2fb1951d03d..503417c0dd29ac59118ff41aaf98d59208a2ef67 100644 |
--- a/chrome/browser/extensions/install_tracker.cc |
+++ b/chrome/browser/extensions/install_tracker.cc |
@@ -21,8 +21,6 @@ InstallTracker::InstallTracker(Profile* profile, |
: extension_registry_observer_(this) { |
extension_registry_observer_.Add(ExtensionRegistry::Get(profile)); |
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, |
- content::Source<Profile>(profile)); |
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
content::Source<Profile>(profile)); |
registrar_.Add(this, |
@@ -95,31 +93,10 @@ void InstallTracker::Shutdown() { |
FOR_EACH_OBSERVER(InstallObserver, observers_, OnShutdown()); |
} |
-void InstallTracker::OnExtensionLoaded(content::BrowserContext* browser_context, |
- const Extension* extension) { |
- FOR_EACH_OBSERVER(InstallObserver, observers_, OnExtensionLoaded(extension)); |
-} |
- |
-void InstallTracker::OnExtensionUnloaded( |
- content::BrowserContext* browser_context, |
- const Extension* extension, |
- UnloadedExtensionInfo::Reason reason) { |
- FOR_EACH_OBSERVER( |
- InstallObserver, observers_, OnExtensionUnloaded(extension)); |
-} |
- |
void InstallTracker::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
switch (type) { |
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: { |
- const Extension* extension = |
- content::Details<const InstalledExtensionInfo>(details).ptr()-> |
- extension; |
- FOR_EACH_OBSERVER(InstallObserver, observers_, |
- OnExtensionInstalled(extension)); |
- break; |
- } |
case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: { |
const Extension* extension = |
content::Details<const Extension>(details).ptr(); |
@@ -151,6 +128,28 @@ void InstallTracker::Observe(int type, |
} |
} |
+void InstallTracker::OnExtensionLoaded(content::BrowserContext* browser_context, |
+ const Extension* extension) { |
+ FOR_EACH_OBSERVER(InstallObserver, observers_, OnExtensionLoaded(extension)); |
not at google - send to devlin
2014/05/16 13:49:03
Ideally we'd get rid of install tracker's use of o
limasdf
2014/05/16 20:39:14
You mean ExtensionRegistry can replace InstallTrac
not at google - send to devlin
2014/05/16 23:03:35
thanks!
|
+} |
+ |
+void InstallTracker::OnExtensionUnloaded( |
+ content::BrowserContext* browser_context, |
+ const Extension* extension, |
+ UnloadedExtensionInfo::Reason reason) { |
+ FOR_EACH_OBSERVER( |
+ InstallObserver, observers_, OnExtensionUnloaded(extension)); |
+} |
+ |
+void InstallTracker::OnExtensionInstalled( |
+ content::BrowserContext* browser_context, |
+ const Extension* extension, |
+ bool is_update, |
+ const std::string& old_name) { |
+ FOR_EACH_OBSERVER( |
+ InstallObserver, observers_, OnExtensionInstalled(extension)); |
+} |
+ |
void InstallTracker::OnAppsReordered() { |
FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered()); |
} |