Index: chrome/browser/extensions/api/declarative_content/content_rules_registry.cc |
diff --git a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc |
index 7b379c1a67f2eeade2c708a517bd25de1713f5a7..3775cda5d4fe52a10a40f534924b4823e7cfb155 100644 |
--- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc |
+++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc |
@@ -24,12 +24,16 @@ using url_matcher::URLMatcherConditionSet; |
namespace extensions { |
ContentRulesRegistry::ContentRulesRegistry(Profile* profile, |
+ const std::string& event_name, |
+ const WatchedPagesRecipient |
+ watched_pages_recipient, |
RulesCacheDelegate* cache_delegate) |
: RulesRegistry(profile, |
- declarative_content_constants::kOnPageChanged, |
+ event_name, |
content::BrowserThread::UI, |
cache_delegate, |
- WebViewKey(0, 0)) { |
+ WebViewKey(0, 0)), |
+ watched_pages_recipient_(watched_pages_recipient) { |
extension_info_map_ = ExtensionSystem::Get(profile)->info_map(); |
registrar_.Add(this, content::NOTIFICATION_RENDERER_PROCESS_CREATED, |
@@ -300,7 +304,14 @@ void ContentRulesRegistry::UpdateConditionCache() { |
void ContentRulesRegistry::InstructRenderProcess( |
content::RenderProcessHost* process) { |
- process->Send(new ExtensionMsg_WatchPages(watched_css_selectors_)); |
+ for (std::vector<std::string>::const_iterator it = |
+ watched_css_selectors_.begin(); |
+ it != watched_css_selectors_.end(); ++it) { |
Fady Samuel
2014/06/23 18:56:28
This is a do-nothing for loop? WhY?
Mark Dittmer
2014/06/24 14:14:19
I couldn't tell you. Probably left over from some
|
+ } |
+ process->Send( |
+ new ExtensionMsg_WatchPages(event_name(), |
+ watched_pages_recipient_, |
+ watched_css_selectors_)); |
} |
bool ContentRulesRegistry::IsEmpty() const { |