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

Issue 2025683003: First experimental implementation of the Clear-Site-Data header (Closed)

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

Description

First experimental implementation of the Clear-Site-Data header We add a ClearSiteDataThrottle to the list of ResourceThrottle-s on a main frame navigation. If the response contains a "Clear-Site-Data" header, ClearSiteDataThrottle parses it and calls BrowsingDataRemover to execute deletion with the specified parameters. The deletion is asynchronous and does not delay or block the navigation. This is an early proof-of-concept implementation of the working draft https://www.w3.org/TR/clear-site-data/ which does not yet comply with its full specification. Tests: - ClearSiteDataThrottleUnittest - parsing - error messages - ClearSiteDataThrottleBrowsertest - secure origins - redirects, - integration with the embedder - ChromeContentBrowserClientTest - removal parameters for BrowsingDataRemover Note that the effect of data being asynchronously deleted while possibly also written by the website in the same time has NOT yet been tested. BUG=607897 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/1f4746d285ff62f0747ef4ce00c72a74f91f92cb Cr-Commit-Position: refs/heads/master@{#413247}

Patch Set 1 #

Total comments: 29

Patch Set 2 : Moved to content/ #

Patch Set 3 : Rebase and fix ListValue iteration. #

Total comments: 30

Patch Set 4 : Addressed comments, added browsertest. #

Patch Set 5 : Rebase #

Patch Set 6 : Compilation fixes. #

Total comments: 2

Patch Set 7 : Comment, file URLs #

Total comments: 26

Patch Set 8 : Rebase over https://codereview.chromium.org/2097083002/ #

Patch Set 9 : Rebase fix (https://codereview.chromium.org/2084903002/) #

Patch Set 10 : Addressed comments. #

Total comments: 4

Patch Set 11 : Fixed tests, extracted c/b/browsing_data #

Total comments: 4

Patch Set 12 : Rebased. #

Patch Set 13 : Moved channel IDs under 'cookies' #

Total comments: 10

Patch Set 14 : Moved the throttle to the end, added TODO #

Patch Set 15 : Don't spam the console. #

Patch Set 16 : Null response headers #

Patch Set 17 : WebContentsObserver #

Total comments: 4

Patch Set 18 : Rebase #

Patch Set 19 : ClearSiteDataHeaderObserver (no longer a throttle) #

Patch Set 20 : Fix URL in comments, remove accidental change. #

Total comments: 33

Patch Set 21 : Addressed comments, git cl format #

Total comments: 1

Patch Set 22 : Rebase #

Patch Set 23 : Rebase, custom mock in ChromeContentBrowserClient #

Patch Set 24 : Many changes, most importantly synchronous deletion. #

Total comments: 55

Patch Set 25 : Addressed comments. #

Total comments: 2

Patch Set 26 : Rebase #

Patch Set 27 : Addressed comments. #

Patch Set 28 : REMOVE_PLUGIN_DATA for eTLD+1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1241 lines, -1 line) Patch
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +103 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 4 chunks +389 lines, -0 lines 0 comments Download
A content/browser/browsing_data/clear_site_data_throttle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +87 lines, -0 lines 0 comments Download
A content/browser/browsing_data/clear_site_data_throttle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +262 lines, -0 lines 0 comments Download
A content/browser/browsing_data/clear_site_data_throttle_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +234 lines, -0 lines 0 comments Download
A content/browser/browsing_data/clear_site_data_throttle_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +134 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_handle_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +7 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 163 (99 generated)
msramek
Hi Mike, Please have a look! This is work in progress, but before I get ...
4 years, 6 months ago (2016-05-30 19:14:33 UTC) #2
Mike West
On 2016/05/30 at 19:14:33, msramek wrote: > Please have a look! This is work in ...
4 years, 6 months ago (2016-05-31 05:34:41 UTC) #3
Mike West
https://codereview.chromium.org/2025683003/diff/1/chrome/browser/browsing_data/clear_site_data_throttle.cc File chrome/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/1/chrome/browser/browsing_data/clear_site_data_throttle.cc#newcode47 chrome/browser/browsing_data/clear_site_data_throttle.cc:47: domain = GetDomainAndRegistry( This is going to strip `www.example.com` ...
4 years, 6 months ago (2016-05-31 05:35:52 UTC) #4
msramek
Thanks Mike! I moved everything to //content; it actually also made the implementation a bit ...
4 years, 6 months ago (2016-06-01 14:20:41 UTC) #6
msramek
https://codereview.chromium.org/2025683003/diff/1/chrome/browser/browsing_data/clear_site_data_throttle.cc File chrome/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/1/chrome/browser/browsing_data/clear_site_data_throttle.cc#newcode112 chrome/browser/browsing_data/clear_site_data_throttle.cc:112: for (const base::Value* value : *types) { On 2016/06/01 ...
4 years, 6 months ago (2016-06-01 14:25:30 UTC) #7
Mike West
On 2016/06/01 at 14:20:41, msramek wrote: > I also noticed that you ran into the ...
4 years, 6 months ago (2016-06-02 06:59:55 UTC) #8
Mike West
On 2016/06/01 at 14:20:41, msramek wrote: > I also noticed that you ran into the ...
4 years, 6 months ago (2016-06-02 06:59:56 UTC) #9
Mike West
https://codereview.chromium.org/2025683003/diff/40001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2025683003/diff/40001/chrome/browser/chrome_content_browser_client.cc#newcode2507 chrome/browser/chrome_content_browser_client.cc:2507: if (remove_storage || remove_cache) { This should be `remove_cookies`, ...
4 years, 6 months ago (2016-06-02 07:00:08 UTC) #10
Mike West
+bratell@opera for a question about how y'all implement the BrowsingDataRemove type of functionality. :) https://codereview.chromium.org/2025683003/diff/40001/content/public/browser/content_browser_client.h ...
4 years, 6 months ago (2016-06-02 07:05:44 UTC) #12
Mike West
+sof as well, for good measure. :)
4 years, 6 months ago (2016-06-02 07:06:28 UTC) #14
Daniel Bratell
https://codereview.chromium.org/2025683003/diff/40001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/2025683003/diff/40001/content/public/browser/content_browser_client.h#newcode563 content/public/browser/content_browser_client.h:563: virtual void ClearSiteData( On 2016/06/02 07:05:44, Mike West (OOO ...
4 years, 6 months ago (2016-06-02 09:15:46 UTC) #15
Mike West
Ping?
4 years, 6 months ago (2016-06-06 15:50:10 UTC) #16
Mike West
bratell@: Thanks for taking a look! Martin, can you remember to make sure that we ...
4 years, 6 months ago (2016-06-06 15:51:24 UTC) #17
msramek
Hi again Mike! Sorry for the delays, I was OOO most of the time. I ...
4 years, 6 months ago (2016-06-14 20:12:08 UTC) #21
msramek
And yes, I'll keep Opera folks in loop (and thanks for looking! :) ). Also, ...
4 years, 6 months ago (2016-06-14 20:14:53 UTC) #23
melandory
https://codereview.chromium.org/2025683003/diff/160001/content/browser/frame_host/navigation_handle_impl.cc File content/browser/frame_host/navigation_handle_impl.cc (right): https://codereview.chromium.org/2025683003/diff/160001/content/browser/frame_host/navigation_handle_impl.cc#newcode194 content/browser/frame_host/navigation_handle_impl.cc:194: CHECK(state_ >= WILL_PROCESS_RESPONSE) also fix comment in navigation_handle.h (see ...
4 years, 6 months ago (2016-06-15 08:12:35 UTC) #24
msramek
I have updated the comment, and also fixed the failing tests. They were failing on ...
4 years, 6 months ago (2016-06-15 18:00:40 UTC) #25
Mike West
Hey Martin! I'm at BlinkOn the rest of the week; I'll try to get to ...
4 years, 6 months ago (2016-06-16 09:11:59 UTC) #26
Mike West
Thanks for taking another pass. I've added some comments; mostly nits and testing questions. Getting ...
4 years, 6 months ago (2016-06-20 07:57:38 UTC) #27
Mike West
Ping?
4 years, 6 months ago (2016-06-24 09:25:56 UTC) #28
Mike West
On 2016/06/24 at 09:25:56, Mike West (OOO through 4th) wrote: > Ping? ^^ :)
4 years, 5 months ago (2016-06-29 05:59:28 UTC) #29
msramek
On 2016/06/29 05:59:28, Mike West (OOO through 4th) wrote: > On 2016/06/24 at 09:25:56, Mike ...
4 years, 5 months ago (2016-06-29 08:51:30 UTC) #30
Mike West
On 2016/06/29 at 08:51:30, msramek wrote: > On 2016/06/29 05:59:28, Mike West (OOO through 4th) ...
4 years, 5 months ago (2016-07-15 13:08:35 UTC) #32
msramek
All whacked! :) But it took me some time to get the tests right. - ...
4 years, 5 months ago (2016-07-15 16:47:39 UTC) #35
msramek
Oh, and - since a lot of time has passed, I had to rebase first, ...
4 years, 5 months ago (2016-07-15 16:50:45 UTC) #36
Mike West
Looking at this now, but first I'll note that the failures in `ChromeContentBrowserClientClearSiteDataTest.Parameters` look real ...
4 years, 5 months ago (2016-07-18 08:41:08 UTC) #37
Mike West
https://codereview.chromium.org/2025683003/diff/300001/chrome/browser/browsing_data/registrable_domain_filter_builder.cc File chrome/browser/browsing_data/registrable_domain_filter_builder.cc (right): https://codereview.chromium.org/2025683003/diff/300001/chrome/browser/browsing_data/registrable_domain_filter_builder.cc#newcode113 chrome/browser/browsing_data/registrable_domain_filter_builder.cc:113: } To shrink this CL, and give you pieces ...
4 years, 5 months ago (2016-07-18 08:48:18 UTC) #38
msramek
I extracted the //chrome/browser/browsing_data part into a separate CL and fixed the tests (just typos ...
4 years, 5 months ago (2016-07-18 10:02:04 UTC) #40
Mike West
Rebase?
4 years, 5 months ago (2016-07-18 10:09:51 UTC) #42
Mike West
This LGTM with the exception of the Channel ID handling. Let's discuss that while you ...
4 years, 5 months ago (2016-07-18 10:20:34 UTC) #43
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-18 13:10:48 UTC) #46
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-18 13:13:18 UTC) #49
msramek
The extracted part has landed now, so I rebased over it, and addressed your comment ...
4 years, 5 months ago (2016-07-18 13:16:07 UTC) #52
msramek
Hi Camille, Can you please have a look at the navigation handle & throttle parts? ...
4 years, 5 months ago (2016-07-18 13:20:16 UTC) #54
Mike West
LGTM again, except that I don't like the aesthetics of your XOR, but I won't ...
4 years, 5 months ago (2016-07-18 13:35:48 UTC) #56
clamy
Thanks! A few comments. https://codereview.chromium.org/2025683003/diff/400001/content/browser/browsing_data/clear_site_data_throttle.cc File content/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/400001/content/browser/browsing_data/clear_site_data_throttle.cc#newcode38 content/browser/browsing_data/clear_site_data_throttle.cc:38: void ConsoleLog(std::vector<ClearSiteDataThrottle::ConsoleMessage>* messages, @mkwst: Didn't ...
4 years, 5 months ago (2016-07-18 14:47:49 UTC) #59
msramek
Thanks! I answered your questions and asked more questions :) https://codereview.chromium.org/2025683003/diff/400001/chrome/browser/chrome_content_browser_client_unittest.cc File chrome/browser/chrome_content_browser_client_unittest.cc (right): https://codereview.chromium.org/2025683003/diff/400001/chrome/browser/chrome_content_browser_client_unittest.cc#newcode401 ...
4 years, 5 months ago (2016-07-18 17:03:20 UTC) #62
clamy
https://codereview.chromium.org/2025683003/diff/400001/content/browser/browsing_data/clear_site_data_throttle.cc File content/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/400001/content/browser/browsing_data/clear_site_data_throttle.cc#newcode77 content/browser/browsing_data/clear_site_data_throttle.cc:77: navigation_handle()->GetRenderFrameHost()->AddMessageToConsole( On 2016/07/18 17:03:20, msramek wrote: > On 2016/07/18 ...
4 years, 5 months ago (2016-07-19 13:27:54 UTC) #69
msramek
In the last three patchsets, I have fixed the layout tests failures: 1. Complaining to ...
4 years, 5 months ago (2016-07-19 16:44:33 UTC) #82
msramek
Friendly ping! Camille, do you have more comments on this CL?
4 years, 4 months ago (2016-07-26 11:04:48 UTC) #84
clamy
A few more comments. I find a class being a NavigationThrottle and a WCO very ...
4 years, 4 months ago (2016-07-26 16:48:14 UTC) #85
msramek
Thanks! I addressed your comments. Unfortunately the rename/copy detection was not as good as I ...
4 years, 4 months ago (2016-07-27 15:02:53 UTC) #99
clamy
Sorry I did not have the time to review this today, and I'm going away ...
4 years, 4 months ago (2016-07-27 16:35:10 UTC) #103
nasko
Some initial comments. However, I'd like to see a design document on how this header ...
4 years, 4 months ago (2016-07-28 17:30:31 UTC) #104
msramek
Hi Nasko, I addressed most of your comments, but not the ones about WebContentsObserver and ...
4 years, 4 months ago (2016-08-01 16:03:20 UTC) #111
msramek
...and I rebased, since the last patchset had a dependency that was in the meantime ...
4 years, 4 months ago (2016-08-01 16:41:32 UTC) #112
nasko
https://codereview.chromium.org/2025683003/diff/580001/content/browser/frame_host/navigation_handle_impl.h File content/browser/frame_host/navigation_handle_impl.h (right): https://codereview.chromium.org/2025683003/diff/580001/content/browser/frame_host/navigation_handle_impl.h#newcode313 content/browser/frame_host/navigation_handle_impl.h:313: std::unique_ptr<ClearSiteDataHeaderObserver> clear_site_data_header_observer_; On 2016/08/01 16:03:19, msramek wrote: > On ...
4 years, 4 months ago (2016-08-03 20:53:13 UTC) #117
msramek
https://codereview.chromium.org/2025683003/diff/580001/content/browser/frame_host/navigation_handle_impl.h File content/browser/frame_host/navigation_handle_impl.h (right): https://codereview.chromium.org/2025683003/diff/580001/content/browser/frame_host/navigation_handle_impl.h#newcode313 content/browser/frame_host/navigation_handle_impl.h:313: std::unique_ptr<ClearSiteDataHeaderObserver> clear_site_data_header_observer_; On 2016/08/03 20:53:13, nasko (Out until 8-8) ...
4 years, 4 months ago (2016-08-04 19:08:38 UTC) #118
msramek
Nasko, please have another look! I rebased (Patchset 23) and made a number of changes ...
4 years, 4 months ago (2016-08-09 15:28:58 UTC) #128
msramek
Friendly ping! :)
4 years, 4 months ago (2016-08-11 15:46:06 UTC) #131
nasko
I didn't review chrome/browser/chrome_content_browser_client_unittest.cc, but covered the rest. https://codereview.chromium.org/2025683003/diff/720001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2025683003/diff/720001/chrome/browser/chrome_content_browser_client.cc#newcode2539 chrome/browser/chrome_content_browser_client.cc:2539: if ...
4 years, 4 months ago (2016-08-11 20:07:22 UTC) #132
msramek
Thanks a lot for the thorough review, Nasko! Please have another look :) I had ...
4 years, 4 months ago (2016-08-12 15:06:28 UTC) #145
nasko
Looks good! Just one question. https://codereview.chromium.org/2025683003/diff/720001/content/browser/browsing_data/clear_site_data_throttle.cc File content/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/720001/content/browser/browsing_data/clear_site_data_throttle.cc#newcode41 content/browser/browsing_data/clear_site_data_throttle.cc:41: void ConsoleLog(std::vector<ClearSiteDataThrottle::ConsoleMessage>* messages, On ...
4 years, 4 months ago (2016-08-12 21:44:54 UTC) #148
msramek
https://codereview.chromium.org/2025683003/diff/720001/content/browser/browsing_data/clear_site_data_throttle.cc File content/browser/browsing_data/clear_site_data_throttle.cc (right): https://codereview.chromium.org/2025683003/diff/720001/content/browser/browsing_data/clear_site_data_throttle.cc#newcode126 content/browser/browsing_data/clear_site_data_throttle.cc:126: while (handle->GetResponseHeaders()->EnumerateHeaderLines(&iter, &header_name, On 2016/08/12 21:44:53, nasko (slow) wrote: ...
4 years, 4 months ago (2016-08-16 13:47:37 UTC) #149
msramek
And Mike, you have already given your LGTM, but since I had to rewrite the ...
4 years, 4 months ago (2016-08-16 13:55:38 UTC) #150
nasko
Thanks for sticking through the review and being very responsive. LGTM!
4 years, 4 months ago (2016-08-16 16:30:48 UTC) #151
msramek
\o/ Thanks Nasko! :)
4 years, 4 months ago (2016-08-16 17:28:53 UTC) #152
msramek
Hey Mike - friendly ping :) Do you want to have another look at the ...
4 years, 4 months ago (2016-08-18 08:42:58 UTC) #153
Mike West
> Hey Mike - friendly ping :) Do you want to have another look at ...
4 years, 4 months ago (2016-08-18 08:55:10 UTC) #154
msramek
Thanks Mike! In the last patchset, I moved REMOVE_PLUGIN_DATA to the eTLD+1 bucket. This CL ...
4 years, 4 months ago (2016-08-18 12:09:44 UTC) #155
msramek
Okay, the prerequisites should have been sorted out now. Let's try to land this :-)
4 years, 4 months ago (2016-08-19 20:17:08 UTC) #156
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/2025683003/840001
4 years, 4 months ago (2016-08-19 20:18:37 UTC) #159
commit-bot: I haz the power
Committed patchset #28 (id:840001)
4 years, 4 months ago (2016-08-19 21:37:37 UTC) #161
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 21:44:34 UTC) #163
Message was sent while issue was closed.
Patchset 28 (id:??) landed as
https://crrev.com/1f4746d285ff62f0747ef4ce00c72a74f91f92cb
Cr-Commit-Position: refs/heads/master@{#413247}

Powered by Google App Engine
This is Rietveld 408576698