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 9746a9b7d7f5ece1825898a539dfdf264d9d5444..4605de1e8ee0d15dc25e61671032acf9fce69d60 100644 |
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h |
@@ -76,13 +76,13 @@ class WebRequestRulesRegistry : public RulesRegistryWithCache { |
// TODO(battre): This will become an implementation detail, because we need |
// a way to also execute the actions of the rules. |
std::set<const WebRequestRule*> GetMatches( |
Jeffrey Yasskin
2013/01/24 00:39:17
Dominic told me to make ContentRulesRegistery::Get
vabr (Chromium)
2013/01/24 18:24:08
Yay, hooray to const URLMatcher::MatchURL()! :)
Do
|
- const DeclarativeWebRequestData& request_data); |
+ DeclarativeWebRequestData* request_data); |
// Returns which modifications should be executed on the network request |
// according to the rules registered in this registry. |
std::list<LinkedPtrEventResponseDelta> CreateDeltas( |
const ExtensionInfoMap* extension_info_map, |
- const DeclarativeWebRequestData& request_data, |
+ DeclarativeWebRequestData* request_data, |
bool crosses_incognito); |
// Implementation of RulesRegistryWithCache: |
@@ -124,6 +124,15 @@ class WebRequestRulesRegistry : public RulesRegistryWithCache { |
typedef std::map<URLMatcherConditionSet::ID, WebRequestRule*> RuleTriggers; |
typedef std::map<WebRequestRule::GlobalRuleId, linked_ptr<WebRequestRule> > |
RulesMap; |
+ typedef std::set<URLMatcherConditionSet::ID> URLMatches; |
+ typedef std::set<const WebRequestRule*> RuleSet; |
+ |
+ // This is a helper function to GetMatches. Rules triggered by |url_matches| |
+ // get added to |result| if one of their conditions fires. |request_data| get |
Jeffrey Yasskin
2013/01/24 00:39:17
s/fires/is fulfilled/?
vabr (Chromium)
2013/01/24 18:24:08
Done.
|
+ // just passed to IsFulfilled of the rules' condition sets. |
+ void AddTriggeredRules(const URLMatches& url_matches, |
+ const DeclarativeWebRequestData& request_data, |
+ RuleSet* result); |
// Map that tells us which WebRequestRule may match under the condition that |
// the URLMatcherConditionSet::ID was returned by the |url_matcher_|. |