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

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..2798910094b5bff6a091264e1d576ccdfb783414 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition.h
@@ -46,9 +46,10 @@ class WebRequestCondition {
const base::Value& condition,
std::string* error);
+ // TODO(yoz): fix ALL the comments
// Returns whether |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 +71,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_;
@@ -105,9 +106,9 @@ class WebRequestConditionSet {
// 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;
+ 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