Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29338962: Issue 3860 - Move request blocking logic to a seperate module (Closed)

Created:
March 23, 2016, 1:55 p.m. by Sebastian Noack
Modified:
March 23, 2016, 5:38 p.m.
Reviewers:
kzar
Visibility:
Public.

Description

Issue 3860 - Move request blocking logic to a seperate module

Patch Set 1 #

Total comments: 17

Patch Set 2 : Addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -192 lines) Patch
M background.js View 2 chunks +3 lines, -51 lines 0 comments Download
M include.preload.js View 1 chunk +1 line, -1 line 0 comments Download
M lib/requestBlocker.js View 1 2 chunks +110 lines, -62 lines 0 comments Download
M lib/whitelisting.js View 5 chunks +52 lines, -76 lines 0 comments Download
M metadata.common View 3 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 4
Sebastian Noack
https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js#newcode116 lib/requestBlocker.js:116: FilterNotifier.addListener((action, arg) => I hope you don't mind that ...
March 23, 2016, 2:02 p.m. (2016-03-23 14:02:07 UTC) #1
kzar
https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js#newcode86 lib/requestBlocker.js:86: let sitekey = getKey(sender.page, sender.frame); Nit: the name `sitekey` ...
March 23, 2016, 3:36 p.m. (2016-03-23 15:36:00 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js File lib/requestBlocker.js (right): https://codereview.adblockplus.org/29338962/diff/29338963/lib/requestBlocker.js#newcode86 lib/requestBlocker.js:86: let sitekey = getKey(sender.page, sender.frame); On 2016/03/23 15:36:00, kzar ...
March 23, 2016, 4:44 p.m. (2016-03-23 16:44:48 UTC) #3
kzar
March 23, 2016, 5:18 p.m. (2016-03-23 17:18:22 UTC) #4
LGTM

https://codereview.adblockplus.org/29338962/diff/29338963/lib/whitelisting.js
File lib/whitelisting.js (right):

https://codereview.adblockplus.org/29338962/diff/29338963/lib/whitelisting.js...
lib/whitelisting.js:143: let key = parts[0].replace(/=/g, "");
On 2016/03/23 16:44:48, Sebastian Noack wrote:
> On 2016/03/23 15:36:00, kzar wrote:
> > Don't we rather want to trim the "="s from the start of the key than remove
> them
> > throughout the first part?
> 
> We want to trim them from the end. However, they can only appear at the end in
> base64 anyway. So this simpler regexp is saved. Note that we also used it
> before.

Acknowledged.

https://codereview.adblockplus.org/29338962/diff/29338963/lib/whitelisting.js...
lib/whitelisting.js:175: chrome.webRequest.onHeadersReceived.addListener(
On 2016/03/23 16:44:48, Sebastian Noack wrote:
> On 2016/03/23 15:36:00, kzar wrote:
> > I guess this part should be in ext/chrome somewhere?
> 
> Not really. There is no counterpart for Safari. And we generally don't add
APIs
> that only exist on one platform to the abstraction layer.

Acknowledged.

Powered by Google App Engine
This is Rietveld