Index: chrome/browser/extensions/api/declarative/rules_registry_service.h |
diff --git a/chrome/browser/extensions/api/declarative/rules_registry_service.h b/chrome/browser/extensions/api/declarative/rules_registry_service.h |
index af4ce2be237d8f73a7ec0864e735d7f7a2153ab6..7c10f59b42b23c65917f10db5184e5b797d76fa0 100644 |
--- a/chrome/browser/extensions/api/declarative/rules_registry_service.h |
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service.h |
@@ -89,7 +89,8 @@ class RulesRegistryService : public ProfileKeyedAPI, |
void RemoveWebViewRulesRegistries(int process_id); |
// For testing. |
- void SimulateExtensionUnloaded(const std::string& extension_id); |
+ void SimulateExtensionUninstalled(const std::string& extension_id); |
+ |
private: |
friend class ProfileKeyedAPIFactory<RulesRegistryService>; |
@@ -98,16 +99,26 @@ class RulesRegistryService : public ProfileKeyedAPI, |
typedef std::map<RulesRegistryKey, scoped_refptr<RulesRegistry> > |
RulesRegistryMap; |
- // Notifies all RulesRegistries that |extension_id| was unloaded. |
- // It is not guaranteed that this notification is processed synchronously. |
- // If extensions live on another thread, the notification is posted. |
+ // Notifes all RulesRegistry instances that the availability of |extension_id| |
+ // has changed. It is not guaranteed that this notification is processed |
+ // synchronously. If extensions live on another thread, then the notification |
+ // is posted. |
+ void OnExtensionUninstalled(const std::string& extension_id); |
void OnExtensionUnloaded(const std::string& extension_id); |
+ void OnExtensionLoaded(const std::string& extension_id); |
// Implementation of content::NotificationObserver. |
virtual void Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // Iterates over all registries, and calls |notification_callback| on them |
+ // with |extension_id| as the argument. If a registry lives on a different |
+ // thread, the call is posted to that thread. |
+ void NotifyRegistriesHelper( |
+ void (RulesRegistry::*notification_callback)(const std::string&), |
+ const std::string& extension_id); |
+ |
// ProfileKeyedAPI implementation. |
static const char* service_name() { |
return "RulesRegistryService"; |