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

Issue 2859783002: [subresource_filter] Make website setting existence imply site activation (Closed)

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

Description

[subresource_filter] Make website setting existence imply site activation This patch tries its best to make the relationship 1:1 between site activation status and the WebsiteSetting metadata being present for that origin. The setting is added when a site is activated and the UI is shown (to prevent cases where no resources are filtered or we are activated but suppressing UI). The setting is removed when a site is found to not activate for a particular top level navigation (% content setting whitelists), or when a url matching the setting's origin is deleted from history. Since we don't want to clear this state if the user makes some explicit action (like whitelisting), we make sure the whitelisting check is the very last one in activation computation and don't take it into account for setting removal. In this way the setting is a best approximation for a cached activation state (minus content setting policy) for a given origin. Currently it is only used for the smart UI, but in follow up patches we will make other settings UI surfaces dependent on this state. Note: The setting is now used on both Desktop and Android, and is now NOT_LOSSY. BUG=689487 Review-Url: https://codereview.chromium.org/2859783002 Cr-Commit-Position: refs/heads/master@{#470945} Committed: https://chromium.googlesource.com/chromium/src/+/31a9f6426ec06155f4b95e5e125d76e0371d0c74

Patch Set 1 #

Patch Set 2 : Clear the metadata when activation is disabled #

Patch Set 3 : add test + tweaks #

Patch Set 4 : Ensure http/s #

Patch Set 5 : simplify #

Total comments: 8

Patch Set 6 : fix Fake database issue #

Patch Set 7 : shivanisha review #

Total comments: 2

Patch Set 8 : remove comment (trybots prev) #

Patch Set 9 : blacklist #

Patch Set 10 : rebase #

Patch Set 11 : add test #

Patch Set 12 : rebase #

Messages

Total messages: 66 (48 generated)
Charlie Harrison
msramek: PTAL at //chrome and content_settings parts. This is basically an extension of the previous ...
3 years, 7 months ago (2017-05-09 13:09:46 UTC) #22
shivanisha
Nice. First pass comments. https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc#newcode148 chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:148: } Can this callback also ...
3 years, 7 months ago (2017-05-09 15:43:36 UTC) #27
Charlie Harrison
https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc File chrome/browser/subresource_filter/chrome_subresource_filter_client.cc (right): https://codereview.chromium.org/2859783002/diff/80001/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc#newcode148 chrome/browser/subresource_filter/chrome_subresource_filter_client.cc:148: } On 2017/05/09 15:43:35, shivanisha wrote: > Can this ...
3 years, 7 months ago (2017-05-09 16:19:23 UTC) #30
shivanisha
lgtm % nit https://codereview.chromium.org/2859783002/diff/120001/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/2859783002/diff/120001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode1 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:1: // // Raw pointers passed in ...
3 years, 7 months ago (2017-05-09 16:34:28 UTC) #31
Charlie Harrison
https://codereview.chromium.org/2859783002/diff/120001/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/2859783002/diff/120001/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc#newcode1 components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc:1: // // Raw pointers passed in here must all ...
3 years, 7 months ago (2017-05-09 16:50:13 UTC) #32
Charlie Harrison
This CL is slightly wrong, we want to be plumbing the actual activation decision, not ...
3 years, 7 months ago (2017-05-09 18:58:44 UTC) #33
Charlie Harrison
OK I think this CL is now ready for review. shivanisha@ would you take another ...
3 years, 7 months ago (2017-05-10 12:30:01 UTC) #47
engedy
The only gotcha I can think of is that users who are running a dry-run ...
3 years, 7 months ago (2017-05-10 13:19:10 UTC) #48
Charlie Harrison
On 2017/05/10 13:19:10, engedy wrote: > The only gotcha I can think of is that ...
3 years, 7 months ago (2017-05-10 18:39:09 UTC) #49
Charlie Harrison
On 2017/05/10 18:39:09, Charlie Harrison wrote: > On 2017/05/10 13:19:10, engedy wrote: > > The ...
3 years, 7 months ago (2017-05-10 18:39:42 UTC) #50
Charlie Harrison
On 2017/05/10 18:39:42, Charlie Harrison wrote: > On 2017/05/10 18:39:09, Charlie Harrison wrote: > > ...
3 years, 7 months ago (2017-05-10 18:44:27 UTC) #51
engedy
> Sorry for all the spam. Now I am thinking we could just plumb ActivationDecision ...
3 years, 7 months ago (2017-05-10 18:45:34 UTC) #52
engedy
> Sorry for all the spam. Now I am thinking we could just plumb ActivationDecision ...
3 years, 7 months ago (2017-05-10 18:45:35 UTC) #53
Charlie Harrison
OK, I've updated the PS accordingly and added a test for this case.
3 years, 7 months ago (2017-05-10 19:15:36 UTC) #55
msramek
LGTM
3 years, 7 months ago (2017-05-10 20:27:10 UTC) #59
Charlie Harrison
Thanks!
3 years, 7 months ago (2017-05-11 12:57:58 UTC) #60
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/2859783002/220001
3 years, 7 months ago (2017-05-11 12:58:44 UTC) #63
commit-bot: I haz the power
3 years, 7 months ago (2017-05-11 14:23:02 UTC) #66
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/31a9f6426ec06155f4b95e5e125d...

Powered by Google App Engine
This is Rietveld 408576698