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 37bb8c0fbd3c6971398f478cc353a9e0fcf0e1f1..3ed7a4d929bc633203ba19be7c78cd6474e299e5 100644 |
--- a/chrome/browser/extensions/api/declarative/rules_registry_service.h |
+++ b/chrome/browser/extensions/api/declarative/rules_registry_service.h |
@@ -14,6 +14,7 @@ |
#include "base/memory/scoped_vector.h" |
#include "base/scoped_observer.h" |
#include "chrome/browser/extensions/api/declarative/rules_registry.h" |
+#include "chrome/browser/extensions/api/declarative_content/content_rules_registry.h" |
#include "chrome/browser/profiles/profile.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
@@ -28,7 +29,6 @@ class NotificationSource; |
} |
namespace extensions { |
-class ContentRulesRegistry; |
class ExtensionRegistry; |
class RulesRegistry; |
class RulesRegistryStorageDelegate; |
@@ -84,11 +84,12 @@ class RulesRegistryService : public BrowserContextKeyedAPI, |
const WebViewKey& webview_key, |
const std::string& event_name); |
- // Accessors for each type of rules registry. |
- ContentRulesRegistry* content_rules_registry() const { |
- CHECK(content_rules_registry_); |
- return content_rules_registry_; |
+ // Accessors for content rules registries. |
+ ContentRulesRegistryMap& content_rules_registry_map() { |
+ return content_rules_registry_map_; |
} |
+ ContentRulesRegistry* GetContentRulesRegistry( |
+ const std::string& event_name); |
// Removes all rules registries of a given webview embedder process ID. |
void RemoveWebViewRulesRegistries(int process_id); |
@@ -139,9 +140,9 @@ class RulesRegistryService : public BrowserContextKeyedAPI, |
// We own the parts of the registries which need to run on the UI thread. |
ScopedVector<RulesCacheDelegate> cache_delegates_; |
- // Weak pointer into rule_registries_ to make it easier to handle content rule |
- // conditions. |
- ContentRulesRegistry* content_rules_registry_; |
+ // Collection of content rule registries to make it easier to handle content |
+ // rule conditions. |
+ ContentRulesRegistryMap content_rules_registry_map_; |
content::NotificationRegistrar registrar_; |