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

Issue 149737: Blacklist API change for allowing multiple rule matches... (Closed)

Created:
11 years, 5 months ago by idanan
Modified:
9 years, 7 months ago
Reviewers:
Sverrir
CC:
chromium-reviews_googlegroups.com, darin (slow to review), brettw, jam, willchan no longer on Chromium, Ben Goodger (Google)
Visibility:
Public.

Description

Blacklist API change for allowing multiple rule matches The findMatch function now returns a Match object which aggregates multiple entries into one, in case (which is expected to be common) that multiple rules match a given URL. Since the set of matches is highly dependent on the URL, the Match class replaces the old RequestData object to be added to URLRequests. BUG=16932 TEST=Blacklist* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20886

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -49 lines) Patch
M chrome/browser/net/chrome_url_request_context.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M chrome/browser/privacy_blacklist/blacklist.h View 1 3 chunks +32 lines, -13 lines 0 comments Download
M chrome/browser/privacy_blacklist/blacklist.cc View 1 2 5 chunks +95 lines, -14 lines 0 comments Download
M chrome/browser/privacy_blacklist/blacklist_unittest.cc View 1 3 chunks +110 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 2 chunks +17 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
idanan
11 years, 5 months ago (2009-07-16 18:44:27 UTC) #1
Sverrir
11 years, 5 months ago (2009-07-16 19:34:39 UTC) #2
LGTM

Possibly add some more tests for "nasty" url's and matches - since both the
pb-lists and the url's are potentially malicious.

http://codereview.chromium.org/149737/diff/1005/19
File chrome/browser/privacy_blacklist/blacklist.cc (right):

http://codereview.chromium.org/149737/diff/1005/19#newcode57
Line 57: while (pattern[++p] == '@');  // Consecutive @ are redundant.
@ symbol at end of input will cause a boom?

http://codereview.chromium.org/149737/diff/1005/19#newcode70
Line 70: (url.compare(url.size() - pr, pr, pattern.c_str() + p) == 0);
4 space indent

http://codereview.chromium.org/149737/diff/1005/19#newcode126
Line 126: i != entries_.end(); ++i) {
4 space indent

http://codereview.chromium.org/149737/diff/1005/18
File chrome/browser/renderer_host/resource_message_filter.cc (right):

http://codereview.chromium.org/149737/diff/1005/18#newcode442
Line 442: }
add a scope for the first if.

Powered by Google App Engine
This is Rietveld 408576698