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

Unified Diff: chrome/browser/extensions/api/declarative_content/content_rules_registry.cc

Issue 491913003: Add Reapply() to declarative action interface. This is needed for RequestContentScript to work corr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 6 years, 4 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/api/declarative_content/content_action.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b3eddfe40b10f57417911c2807c3aab7a1bb5640 100644
--- a/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
+++ b/chrome/browser/extensions/api/declarative_content/content_rules_registry.cc
@@ -80,8 +80,12 @@ void ContentRulesRegistry::Apply(
};
for (std::set<ContentRule*>::const_iterator it = matching_rules.begin();
it != matching_rules.end(); ++it) {
- if (!ContainsKey(prev_matching_rules, *it))
+ if (!ContainsKey(prev_matching_rules, *it)) {
(*it)->actions().Apply((*it)->extension_id(), base::Time(), &apply_info);
+ } else {
+ (*it)->actions().Reapply(
+ (*it)->extension_id(), base::Time(), &apply_info);
+ }
}
for (std::set<ContentRule*>::const_iterator it = prev_matching_rules.begin();
it != prev_matching_rules.end(); ++it) {
« no previous file with comments | « chrome/browser/extensions/api/declarative_content/content_action.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698