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

Issue 10923002: Extracting header testing code from WebRequestConditionAttributeResponseHeaders. (Closed)

Created:
8 years, 3 months ago by vabr (Chromium)
Modified:
8 years, 3 months ago
Reviewers:
Yoyo Zhou, battre
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, battre
Visibility:
Public.

Description

Extracting header testing code from WebRequestConditionAttributeResponseHeaders. In preparation for adding a new condition attribute for matching request headers, the code independent of the headers being 'response' or 'request' is extracted and put into a separate class TestManager to be easily reused. BUG=143662, 112155 TEST=This change should introduce no change in behaviour and no new features. To check that it does not break the old functionality, install the extension attached to BUG 143662. If this feature is working correctly the extension should cancel every navigation. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154939

Patch Set 1 #

Patch Set 2 : Typo in a comment #

Total comments: 4

Patch Set 3 : TestManager->HeaderMatcher #

Patch Set 4 : Corrected indenting, clarified comments and some names #

Total comments: 18

Patch Set 5 : Dominic's comments #

Patch Set 6 : Case-insensitive handling all in one class #

Patch Set 7 : Correction of a negated condition and more unit-tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -208 lines) Patch
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.h View 1 2 3 3 chunks +10 lines, -57 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc View 1 2 3 4 5 6 2 chunks +243 lines, -147 lines 0 comments Download
M chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc View 1 2 3 4 5 6 1 chunk +22 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
vabr (Chromium)
Hi Yoyo, Do you think you could review this? I'm trying to load-balance Dominic, and ...
8 years, 3 months ago (2012-08-31 15:34:25 UTC) #1
Yoyo Zhou
http://codereview.chromium.org/10923002/diff/2001/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (right): http://codereview.chromium.org/10923002/diff/2001/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode473 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:473: // We never get past the "switch", but the ...
8 years, 3 months ago (2012-09-01 19:44:50 UTC) #2
vabr (Chromium)
Thanks, Yoyo, for the comments. I addressed them, and corrected a couple of other minor ...
8 years, 3 months ago (2012-09-03 07:37:05 UTC) #3
battre
http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (left): http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#oldcode419 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:419: *error = ExtensionErrorUtils::FormatErrorMessage(kInvalidValue, *key); why did you remove this? ...
8 years, 3 months ago (2012-09-03 08:46:46 UTC) #4
vabr (Chromium)
Dominic, Thanks for your comments. Some addressed, some opposed :), please see my answers. Vaclav ...
8 years, 3 months ago (2012-09-03 10:12:36 UTC) #5
battre
http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (left): http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#oldcode419 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:419: *error = ExtensionErrorUtils::FormatErrorMessage(kInvalidValue, *key); On 2012/09/03 10:12:36, vabr (Chromium) ...
8 years, 3 months ago (2012-09-03 12:48:08 UTC) #6
vabr (Chromium)
Thanks again, Dominic! Vaclav http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc File chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc (right): http://codereview.chromium.org/10923002/diff/11002/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc#newcode266 chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute.cc:266: MatchType match_type); On 2012/09/03 12:48:08, ...
8 years, 3 months ago (2012-09-03 14:21:29 UTC) #7
vabr (Chromium)
Thanks Dominic for one more error you found! Corrected and enhanced the unit-tests to catch ...
8 years, 3 months ago (2012-09-03 15:24:14 UTC) #8
battre
lgtm
8 years, 3 months ago (2012-09-04 09:55:21 UTC) #9
Yoyo Zhou
LGTM, if that wasn't clear
8 years, 3 months ago (2012-09-05 00:22:58 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10923002/5005
8 years, 3 months ago (2012-09-05 08:40:15 UTC) #11
commit-bot: I haz the power
8 years, 3 months ago (2012-09-05 11:04:04 UTC) #12
Change committed as 154939

Powered by Google App Engine
This is Rietveld 408576698