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

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

Issue 10831150: Refactor request parameters into RequestData struct. Also make RequestStage singular. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ?? Created 8 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
Index: chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
index a371949029641156235e298220682b88c68fb363..0a84a84f0f16016c11e95a7c260c1c31370acade 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
@@ -46,9 +46,9 @@ class WebRequestCondition {
const base::Value& condition,
std::string* error);
- // Returns whether |request| is a match, given that the URLMatcher found
+ // Returns whether the request is a match, given that the URLMatcher found
// a match for |url_matcher_conditions_|.
- bool IsFulfilled(net::URLRequest* request, RequestStages request_stage) const;
+ bool IsFulfilled(const WebRequestRule::RequestData& request_data) const;
// Returns a URLMatcherConditionSet::ID which is the canonical representation
// for all URL patterns that need to be matched by this WebRequestCondition.
@@ -70,7 +70,7 @@ class WebRequestCondition {
scoped_refptr<URLMatcherConditionSet> url_matcher_conditions_;
WebRequestConditionAttributes condition_attributes_;
- // Bit vector indicating all RequestStages during which all
+ // Bit vector indicating all RequestStage during which all
// |condition_attributes_| can be evaluated.
int applicable_request_stages_;
@@ -101,13 +101,13 @@ class WebRequestConditionSet {
}
// Returns whether any condition in the condition set is fulfilled
- // based on a match |url_match| and the value of |request|. This function
- // should be called for each URLMatcherConditionSet::ID that was found
- // by the URLMatcher to ensure that the each trigger in |match_triggers_| is
- // found.
- bool IsFulfilled(URLMatcherConditionSet::ID url_match,
- net::URLRequest* request,
- RequestStages request_stage) const;
+ // based on a match |url_match| and the value of |request_data.request|.
+ // This function should be called for each URLMatcherConditionSet::ID
+ // that was found by the URLMatcher to ensure that the each trigger in
+ // |match_triggers_| is found.
+ bool IsFulfilled(
+ URLMatcherConditionSet::ID url_match,
+ const WebRequestRule::RequestData& request_data) const;
// Appends the URLMatcherConditionSet from all conditions to |condition_sets|.
void GetURLMatcherConditionSets(

Powered by Google App Engine
This is Rietveld 408576698