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

Issue 1741123002: Add removal filter support for Cookies, Storage, and Content Settings. (Closed)

Created:
4 years, 10 months ago by dmurph
Modified:
4 years, 8 months ago
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, romax
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add removal filter support for Cookies, Storage, and Content Settings. We modify BrowsingDataRemover to add more origin filtering support for: * Cookies * Storage Partition (idb, cookies, etc) * Content Settings map values, specifically * CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT * CONTENT_SETTINGS_TYPE_APP_BANNER * Offline pages We remove |remove_url|, which was never used except for tests. This also removes support for (to be added in the future): * origin-specific history removal * origin-specific extension removal Here is the followup patch which would do the JNI hookup: https://codereview.chromium.org/1757163002 BUG=589586, 578162 Committed: https://crrev.com/d193beb95152b418357056525d1c6b6a641d7b16 Cr-Commit-Position: refs/heads/master@{#386804}

Patch Set 1 #

Total comments: 48

Patch Set 2 : comments #

Total comments: 12

Patch Set 3 : Added & removed tests, fixes, comments #

Patch Set 4 : Added & removed tests, fixes, comments #

Patch Set 5 : Added Cookies #

Patch Set 6 : rebase #

Total comments: 8

Patch Set 7 : build fix #

Patch Set 8 : Added SafeBrowsing cookie support #

Total comments: 6

Patch Set 9 : Fixed Cookies, Tests, etc #

Total comments: 7

Patch Set 10 : Fixes to tests, comments #

Patch Set 11 : IOS support, android compile fix #

Patch Set 12 : ios fix, and fixed test #

Total comments: 34

Patch Set 13 : comments, tests, fixes, and Questions! #

Patch Set 14 : Split cookie changes to separate patch #

Patch Set 15 : moved android changes #

Patch Set 16 : rebase #

Patch Set 17 : Renamed class, comments #

Total comments: 27

Patch Set 18 : comments #

Patch Set 19 : Added offline pages test #

Total comments: 6

Patch Set 20 : Comments #

Patch Set 21 : ContentSettingsPattern test clarification #

Total comments: 2

Patch Set 22 : Fixed Android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1248 lines, -157 lines) Patch
A chrome/browser/browsing_data/browsing_data_filter_builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +120 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/browsing_data_filter_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +140 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +334 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 8 chunks +35 lines, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 25 chunks +123 lines, -56 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 38 chunks +264 lines, -65 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +1 line, -1 line 0 comments Download
M components/offline_pages/offline_page_model.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +11 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_model.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +28 lines, -0 lines 0 comments Download
M components/offline_pages/offline_page_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +59 lines, -0 lines 0 comments Download
M content/browser/storage_partition_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +11 lines, -0 lines 0 comments Download
M content/browser/storage_partition_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +40 lines, -28 lines 0 comments Download
M content/browser/storage_partition_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +53 lines, -0 lines 0 comments Download
M content/public/browser/storage_partition.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +27 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 57 (13 generated)
dmurph
Hello! I'm not totally done w/ this change (still need to filter safe browsing cookies ...
4 years, 10 months ago (2016-02-27 00:02:38 UTC) #4
raymes
https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h File components/content_settings/core/browser/host_content_settings_map.h (right): https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h#newcode197 components/content_settings/core/browser/host_content_settings_map.h:197: void ClearSettingsForOneTypeWithPredicate( Hey Daniel, we chatted about potentially using ...
4 years, 9 months ago (2016-02-29 00:44:59 UTC) #6
Mike West
The changes to BDR look like they're on a reasonable track (though I'm interested in ...
4 years, 9 months ago (2016-02-29 09:27:38 UTC) #7
msramek
-ttr314@chromium.org +ttr314@googlemail.com Also, added my first round of comments :) https://codereview.chromium.org/1741123002/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): https://codereview.chromium.org/1741123002/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc#newcode159 ...
4 years, 9 months ago (2016-02-29 17:46:07 UTC) #9
Timo Reimann
Just a few comments from my side. Apart from that, I'd rather prefer to keep ...
4 years, 9 months ago (2016-02-29 22:38:15 UTC) #10
dmurph
Thanks for the reviews everyone! Some notes: Still TODO: * implement the safe browsing cookies. ...
4 years, 9 months ago (2016-03-01 00:10:00 UTC) #11
raymes
content_settings lgtm with nit https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h File components/content_settings/core/browser/host_content_settings_map.h (right): https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h#newcode197 components/content_settings/core/browser/host_content_settings_map.h:197: void ClearSettingsForOneTypeWithPredicate( Great, thanks! This ...
4 years, 9 months ago (2016-03-01 00:14:50 UTC) #12
raymes
content_settings lgtm with nit https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h File components/content_settings/core/browser/host_content_settings_map.h (right): https://codereview.chromium.org/1741123002/diff/1/components/content_settings/core/browser/host_content_settings_map.h#newcode197 components/content_settings/core/browser/host_content_settings_map.h:197: void ClearSettingsForOneTypeWithPredicate( Great, thanks! This ...
4 years, 9 months ago (2016-03-01 00:14:50 UTC) #13
msramek
Another round of comments. General direction still looks good. https://codereview.chromium.org/1741123002/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): https://codereview.chromium.org/1741123002/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc#newcode161 chrome/browser/browsing_data/browsing_data_remover.cc:161: ...
4 years, 9 months ago (2016-03-01 17:24:10 UTC) #14
Timo Reimann
On 2016/03/01 00:10:00, dmurph wrote: > * ttr314: The crbug.com/589586 bug outlines specifically > what ...
4 years, 9 months ago (2016-03-02 21:42:00 UTC) #15
dmurph
ttr314: This is confusing to me, and I disagree. Replying inline. On Wed, Mar 2, ...
4 years, 9 months ago (2016-03-02 21:52:38 UTC) #16
Timo Reimann
Responses inline. On 2016/03/02 21:52:38, dmurph wrote: > ttr314: > This is confusing to me, ...
4 years, 9 months ago (2016-03-03 00:04:05 UTC) #17
dmurph
Still to do: * Safe browsing cookies * Testing the cookies filtering for browser_data_remover Thanks ...
4 years, 9 months ago (2016-03-08 01:42:56 UTC) #20
dmurph
Alrighty! I finished safe browsing cookie support, and added tests. REGARDING COOKIES: In order to ...
4 years, 9 months ago (2016-03-09 01:00:28 UTC) #23
dmurph
I've been informed that my cookie handling would break the web. I need to do ...
4 years, 9 months ago (2016-03-09 01:26:00 UTC) #24
bsittler
On 2016/03/09 at 01:26:00, dmurph wrote: > I've been informed that my cookie handling would ...
4 years, 9 months ago (2016-03-09 01:34:09 UTC) #25
michaeln
storagepartition impl changes generally lgtm, a couple small comments to consider https://codereview.chromium.org/1741123002/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): ...
4 years, 9 months ago (2016-03-09 20:25:52 UTC) #26
msramek
I left a comment and a question. Apart from that, and when you fix the ...
4 years, 9 months ago (2016-03-10 20:10:09 UTC) #27
dmurph
https://codereview.chromium.org/1741123002/diff/100001/content/browser/storage_partition_impl.cc File content/browser/storage_partition_impl.cc (right): https://codereview.chromium.org/1741123002/diff/100001/content/browser/storage_partition_impl.cc#newcode54 content/browser/storage_partition_impl.cc:54: void ClearCookiesOnIOThread( On 2016/03/09 at 20:25:51, michaeln wrote: > ...
4 years, 9 months ago (2016-03-10 23:00:11 UTC) #28
Mike West
The decision to remove any cookie for a registrable domain makes sense, though I'm a ...
4 years, 9 months ago (2016-03-11 08:36:11 UTC) #29
Mike West
4 years, 9 months ago (2016-03-11 08:36:15 UTC) #30
msramek
https://codereview.chromium.org/1741123002/diff/150001/chrome/browser/browsing_data/origin_filter_builder.cc File chrome/browser/browsing_data/origin_filter_builder.cc (right): https://codereview.chromium.org/1741123002/diff/150001/chrome/browser/browsing_data/origin_filter_builder.cc#newcode64 chrome/browser/browsing_data/origin_filter_builder.cc:64: OriginFilterBuilder::BuildSameOriginContentSettingsFilter() const { On 2016/03/10 23:00:11, dmurph wrote: > ...
4 years, 9 months ago (2016-03-11 20:54:50 UTC) #31
Mike West
Ping?
4 years, 9 months ago (2016-03-17 16:22:31 UTC) #32
chromium-reviews
Sorry, I'm ooo. I added domain support to the origin filter (which should probably be ...
4 years, 9 months ago (2016-03-17 17:03:11 UTC) #33
dmurph
Hello all! I'm back from vacation and I have a few points regarding my new ...
4 years, 8 months ago (2016-03-30 22:21:27 UTC) #34
dmurph
Patch split is done. The cookie changes are here now: https://codereview.chromium.org/1844243002
4 years, 8 months ago (2016-03-31 01:06:08 UTC) #35
dmurph
Here is a rebased and working patch w/ the file name change, with comments addressed ...
4 years, 8 months ago (2016-04-05 00:16:28 UTC) #36
dmurph
+kinuko for storage_partition_impl +fgorski for offline_pages
4 years, 8 months ago (2016-04-07 00:19:14 UTC) #38
kinuko
storage_partition related code lgtm https://codereview.chromium.org/1741123002/diff/310001/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://codereview.chromium.org/1741123002/diff/310001/chrome/browser/browsing_data/browsing_data_remover.h#newcode263 chrome/browser/browsing_data/browsing_data_remover.h:263: // BACKENDS ARE SUPPORTED YET, ...
4 years, 8 months ago (2016-04-07 09:03:08 UTC) #39
msramek
Regarding the renaming - I would still argue that the class is a *FilterBuilder, and ...
4 years, 8 months ago (2016-04-07 16:19:13 UTC) #40
fgorski
Adding Yafei, who is working on storage integration on our side. Also, how/when is the ...
4 years, 8 months ago (2016-04-07 17:02:49 UTC) #41
dmurph
Hello all, I didn't have enough time today to finish the offline pages tests, but ...
4 years, 8 months ago (2016-04-08 23:33:45 UTC) #42
msramek
Hi Dan! Thanks for the explanation in the email. Sorry, I wasn't quick enough to ...
4 years, 8 months ago (2016-04-11 18:19:25 UTC) #43
dmurph
Thanks for the clarification Martin, that sounds perfect. Yes, I wasn't sure if anyone else ...
4 years, 8 months ago (2016-04-11 19:09:49 UTC) #44
fgorski
lgtm, but please address comments. https://codereview.chromium.org/1741123002/diff/350001/components/offline_pages/offline_page_model.cc File components/offline_pages/offline_page_model.cc (right): https://codereview.chromium.org/1741123002/diff/350001/components/offline_pages/offline_page_model.cc#newcode312 components/offline_pages/offline_page_model.cc:312: predicate.Run(id_page_pair.second.url)) wrap with {} ...
4 years, 8 months ago (2016-04-11 20:07:27 UTC) #45
dmurph
https://codereview.chromium.org/1741123002/diff/350001/components/offline_pages/offline_page_model.cc File components/offline_pages/offline_page_model.cc (right): https://codereview.chromium.org/1741123002/diff/350001/components/offline_pages/offline_page_model.cc#newcode312 components/offline_pages/offline_page_model.cc:312: predicate.Run(id_page_pair.second.url)) On 2016/04/11 at 20:07:27, fgorski wrote: > wrap ...
4 years, 8 months ago (2016-04-11 22:29:29 UTC) #46
msramek
I just took one more pass, browsing_data parts still (or again) LGTM. And Thanks, Dan, ...
4 years, 8 months ago (2016-04-12 17:02:59 UTC) #47
dmurph
Martin/Brett: One last question about the ContentSettingsPattern behavior. https://codereview.chromium.org/1741123002/diff/390001/chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc File chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc (right): https://codereview.chromium.org/1741123002/diff/390001/chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc#newcode254 chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc:254: {"*", ...
4 years, 8 months ago (2016-04-12 18:07:10 UTC) #48
michaeln
still lgtm
4 years, 8 months ago (2016-04-12 19:57:48 UTC) #49
Mike West
chrome/browser/browsing_data LGTM. Thanks for taking another pass and splitting out the other patch.
4 years, 8 months ago (2016-04-12 20:11:26 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1741123002/410001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1741123002/410001
4 years, 8 months ago (2016-04-12 20:26:37 UTC) #53
commit-bot: I haz the power
Committed patchset #22 (id:410001)
4 years, 8 months ago (2016-04-12 21:09:47 UTC) #54
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/d193beb95152b418357056525d1c6b6a641d7b16 Cr-Commit-Position: refs/heads/master@{#386804}
4 years, 8 months ago (2016-04-12 21:11:13 UTC) #56
msramek
4 years, 8 months ago (2016-04-13 12:40:38 UTC) #57
Message was sent while issue was closed.
https://codereview.chromium.org/1741123002/diff/390001/chrome/browser/browsin...
File chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc
(right):

https://codereview.chromium.org/1741123002/diff/390001/chrome/browser/browsin...
chrome/browser/browsing_data/browsing_data_filter_builder_unittest.cc:254: {"*",
true},
On 2016/04/12 18:07:10, dmurph wrote:
> Martin (and maybe Brett): I'm unsure if this is the correct behavior. I'm
using
> IDENTITY and PREDECESSOR in my compare, which means that patterns that are
more
> general than my domain pattern aren't matched. This makes sense for the
> whitelist, but maybe for the blacklist we shouldn't delete it? As our sites
> might need something from these content settings?
> 
> We don't actually ever have our filter called with a general pattern like
this,
> but I was testing for it just in case it happened later.

Your IDENTITY+PREDECESSOR matching works if the expectation is that the
whitelist/blacklist contains origins or hosts, and website settings only contain
origins. Things get really complicated if you consider broader patterns, and I'm
not sure if there is a right answer - yes, "*" could contain some data related
to "google.com", but do you really want to delete it if it also contains data
for other domains?

I am fine if the behavior here is undefined, because website settings really
aren't supposed to use anything else than origin-scoped patterns. I'll see if we
can add DCHECKs into the website settings code for this.

Powered by Google App Engine
This is Rietveld 408576698