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

Unified Diff: chrome/browser/extensions/api/declarative_webrequest/webrequest_rules_registry.h

Issue 11414230: Declarative Web Request: firstPartyForCookiesUrl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased + attribute description in JSON changed Created 7 years, 11 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
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..178feef9ac8d738c71e56146f44b78fc74ce9b00 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(
- const DeclarativeWebRequestData& request_data);
+ const WebRequestData& request_data_without_ids) const;
// 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,
+ const WebRequestData& 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 is fulfilled.
+ // |request_data| gets passed to IsFulfilled of the rules' condition sets.
+ void AddTriggeredRules(const URLMatches& url_matches,
+ const WebRequestCondition::MatchData& request_data,
+ RuleSet* result) const;
// Map that tells us which WebRequestRule may match under the condition that
// the URLMatcherConditionSet::ID was returned by the |url_matcher_|.

Powered by Google App Engine
This is Rietveld 408576698