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

Issue 2874663002: [subresource_filter] s/ShouldSuppressActivation/OnPageActivationComputed (Closed)

Created:
3 years, 7 months ago by Charlie Harrison
Modified:
3 years, 7 months ago
Reviewers:
shivanisha, engedy
CC:
chromium-reviews, darin-cc_chromium.org, jam, subresource-filter-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[subresource_filter] s/ShouldSuppressActivation/OnPageActivationComputed This patch slightly refactors the SubresourceFilterClient::ShouldSuppressActivation to be the very last check in activation computation, as well renaming it to OnPageActivationComputed (which takes an extra |activated| bool). This will be used as an accurate //chrome level signal for when activation is disabled for a given site. BUG=689487 Review-Url: https://codereview.chromium.org/2874663002 Cr-Commit-Position: refs/heads/master@{#470885} Committed: https://chromium.googlesource.com/chromium/src/+/61d9b5150be41b4e7e5390a5c1e242f90709539a

Patch Set 1 #

Patch Set 2 : rename suppress #

Total comments: 8

Patch Set 3 : engedy review #

Total comments: 3

Patch Set 4 : Rebase on #470635 #

Patch Set 5 : stl_util #

Patch Set 6 : count() #

Total comments: 3

Patch Set 7 : moreee counting #

Patch Set 8 : minor tweak #

Patch Set 9 : update tests #

Patch Set 10 #

Total comments: 4

Messages

Total messages: 58 (40 generated)
Charlie Harrison
engedy, shivanisha: PTAL?
3 years, 7 months ago (2017-05-10 02:17:50 UTC) #5
engedy
LGTM % nits. Thanks! https://codereview.chromium.org/2874663002/diff/20001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2874663002/diff/20001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode190 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:190: // The client wants the ...
3 years, 7 months ago (2017-05-10 09:44:26 UTC) #12
Charlie Harrison
Thanks! Shivani PTAL? https://codereview.chromium.org/2874663002/diff/20001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2874663002/diff/20001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode190 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:190: // The client wants the best ...
3 years, 7 months ago (2017-05-10 12:19:34 UTC) #15
engedy
LGTM, thanks!
3 years, 7 months ago (2017-05-10 13:09:20 UTC) #16
shivanisha
lgtm % nit https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); nit (for sake of conciseness): ...
3 years, 7 months ago (2017-05-10 17:34:26 UTC) #19
engedy
https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); On 2017/05/10 17:34:25, shivanisha wrote: > nit (for ...
3 years, 7 months ago (2017-05-10 17:40:20 UTC) #20
Charlie Harrison
Thanks https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); On 2017/05/10 17:40:20, engedy wrote: > On ...
3 years, 7 months ago (2017-05-10 18:17:21 UTC) #25
engedy
On 2017/05/10 18:17:21, Charlie Harrison wrote: > Thanks > > https://codereview.chromium.org/2874663002/diff/40001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc > File > components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc ...
3 years, 7 months ago (2017-05-10 18:18:27 UTC) #26
Charlie Harrison
On 2017/05/10 18:18:27, engedy wrote: > On 2017/05/10 18:17:21, Charlie Harrison wrote: > > Thanks ...
3 years, 7 months ago (2017-05-10 18:27:22 UTC) #27
shivanisha
https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); Did you mean to move back to count()?
3 years, 7 months ago (2017-05-10 18:43:19 UTC) #30
Charlie Harrison
https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); On 2017/05/10 18:43:18, shivanisha wrote: > Did you ...
3 years, 7 months ago (2017-05-10 18:55:21 UTC) #32
Charlie Harrison
https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc (right): https://codereview.chromium.org/2874663002/diff/100001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc#newcode196 components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:196: whitelisted_hosts_.end(); On 2017/05/10 18:55:21, Charlie Harrison wrote: > On ...
3 years, 7 months ago (2017-05-10 18:57:32 UTC) #33
commit-bot: I haz the power
This CL has an open dependency (Issue 2871013002 Patch 40001). Please resolve the dependency and ...
3 years, 7 months ago (2017-05-10 19:38:26 UTC) #39
Charlie Harrison
I had to make some minor tweaks to the code to get this working but ...
3 years, 7 months ago (2017-05-11 04:31:46 UTC) #48
engedy
Still LGTM. https://codereview.chromium.org/2874663002/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc File components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc (right): https://codereview.chromium.org/2874663002/diff/180001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode200 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:200: // Check for whitelisted status last, so ...
3 years, 7 months ago (2017-05-11 09:13:14 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2874663002/180001
3 years, 7 months ago (2017-05-11 09:13:52 UTC) #54
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/chromium/src/+/61d9b5150be41b4e7e5390a5c1e242f90709539a
3 years, 7 months ago (2017-05-11 09:20:07 UTC) #57
Charlie Harrison
3 years, 7 months ago (2017-05-11 12:07:16 UTC) #58
Message was sent while issue was closed.
https://codereview.chromium.org/2874663002/diff/180001/components/subresource...
File
components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
(right):

https://codereview.chromium.org/2874663002/diff/180001/components/subresource...
components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:200:
// Check for whitelisted status last, so that the client gets an accurate
On 2017/05/11 09:13:14, engedy wrote:
> follow up nit: Any reason to not do this block of logic at the very end of
> ComputeActivationForMainFrameNavigation?

I chose to do this here so that we can continue to use early return semantics in
ComputeActivation*. Otherwise the method gets messier and harder to reason
about.

I don't feel very strongly about it though.

https://codereview.chromium.org/2874663002/diff/180001/components/subresource...
File
components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc
(right):

https://codereview.chromium.org/2874663002/diff/180001/components/subresource...
components/subresource_filter/content/browser/content_subresource_filter_driver_factory_unittest.cc:802:
// Whitelisting is only applied when the page will otherwise activate.
On 2017/05/11 09:13:14, engedy wrote:
> I started deprioritizing ActivationDecision::WHITELISTED in the multiple
> simultaneous configs CL, and this concludes that change. I like it!

woohoo!

Powered by Google App Engine
This is Rietveld 408576698