Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
index 953dac3bf1b7c05002b1fc0ccd76c65bc6f8664c..7998e055a3375d9b0c0abc999847d9e560af494f 100644 |
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
@@ -100,6 +100,11 @@ class WebRequestRulesRegistry : public RulesRegistryWithCache { |
const std::string& extension_id) const; |
virtual void ClearCacheOnNavigation(); |
+ const std::set<const WebRequestRule*>& |
+ rules_with_untriggered_conditions_for_test() const { |
vabr (Chromium)
2012/12/13 12:18:06
Here I'm not sure about the indenting. I've seen o
Jeffrey Yasskin
2012/12/18 02:24:32
My editor doesn't indent the function name, so I'd
battre
2012/12/18 08:20:44
I have seen both styles. I think that no spaces is
vabr (Chromium)
2012/12/18 18:26:42
For the private-getter: note that this is protecte
vabr (Chromium)
2012/12/18 18:26:42
Thanks both for the advice on indenting. I changed
|
+ return rules_with_untriggered_conditions_; |
+ } |
+ |
private: |
typedef std::map<URLMatcherConditionSet::ID, WebRequestRule*> RuleTriggers; |
typedef std::map<WebRequestRule::GlobalRuleId, linked_ptr<WebRequestRule> > |
@@ -109,6 +114,11 @@ class WebRequestRulesRegistry : public RulesRegistryWithCache { |
// the URLMatcherConditionSet::ID was returned by the |url_matcher_|. |
RuleTriggers rule_triggers_; |
+ // These rules contain condition sets with conditions without URL attributes. |
+ // Such conditions are not triggered by URL matcher, so we need to test them |
+ // separately. |
+ std::set<const WebRequestRule*> rules_with_untriggered_conditions_; |
+ |
RulesMap webrequest_rules_; |
URLMatcher url_matcher_; |