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

Issue 1251243003: Support restricting browsing data removal for downloads by origin. (Closed)

Created:
5 years, 5 months ago by Timo Reimann
Modified:
5 years, 4 months ago
CC:
asanka, benjhayden+dwatch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, markusheintz_
Base URL:
https://chromium.googlesource.com/chromium/src.git@lkgr
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support restricting browsing data removal for downloads by origin. This CL adds support for restricting removal of downloads by origin. We do so by extending DownloadManager's API and passing in the origin. BUG=113969 TEST=added unit tests Committed: https://crrev.com/81dc54b2ec32a33e6a7081f5537c53dc9863a153 Cr-Commit-Position: refs/heads/master@{#342187}

Patch Set 1 #

Total comments: 13

Patch Set 2 : Convert DownloadManagerImpl::IsRestrictedUrl into static function. #

Patch Set 3 : Replace set of GURLs by single Origin. #

Patch Set 4 : Leave TODO and some more clean up. #

Total comments: 1

Patch Set 5 : Move IsRemovableURL closer to call site. #

Patch Set 6 : Add test verifying origin-specific interaction between BrowsingDataRemover and DownloadManager [NOT… #

Patch Set 7 : Undo public (and broken) exposure of kDownloadManagerKeyName. #

Patch Set 8 : Fix DownloadManager dependency injection and GMock matcher. #

Total comments: 4

Patch Set 9 : Apply auto-formatting. #

Total comments: 3

Patch Set 10 : Move IsRemovableURL into anonymous namespace. #

Patch Set 11 : Add separate method to remove downloads by origin. #

Total comments: 4

Patch Set 12 : Use base/callback_forward.h. #

Total comments: 4

Patch Set 13 : Remove unneeded DCHECK; Initialize and clear download URLs along test fixture life cycle. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+208 lines, -30 lines) Patch
M chrome/browser/browsing_data/browsing_data_remover.h View 1 2 3 3 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +15 lines, -14 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 7 chunks +77 lines, -0 lines 0 comments Download
M content/browser/browser_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -3 lines 0 comments Download
M content/browser/download/download_manager_impl.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -0 lines 0 comments Download
M content/browser/download/download_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +38 lines, -6 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +29 lines, -0 lines 0 comments Download
M content/public/browser/browser_context.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/download_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -0 lines 0 comments Download
M content/public/test/mock_download_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 85 (22 generated)
Timo Reimann
Please have a look at my CL and let me know if there's anything missing. ...
5 years, 5 months ago (2015-07-22 19:41:21 UTC) #2
Mike West
On 2015/07/22 at 19:41:21, ttr314 wrote: > Please have a look at my CL and ...
5 years, 5 months ago (2015-07-22 20:15:46 UTC) #3
Mike West
Er, actually leaving comments. https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc#newcode254 chrome/browser/browsing_data/browsing_data_remover.cc:254: const GURL& origin, Please add ...
5 years, 5 months ago (2015-07-22 20:16:04 UTC) #4
Timo Reimann
On 2015/07/22 at 20:15:46, mkwst wrote: > On 2015/07/22 at 19:41:21, ttr314 wrote: > > ...
5 years, 5 months ago (2015-07-22 23:21:39 UTC) #5
Timo Reimann
https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc#newcode291 chrome/browser/browsing_data/browsing_data_remover.cc:291: std::set<GURL> restrict_urls; On 2015/07/22 at 20:16:03, Mike West wrote: ...
5 years, 5 months ago (2015-07-22 23:22:15 UTC) #6
Mike West
https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc File chrome/browser/browsing_data/browsing_data_remover.cc (right): https://codereview.chromium.org/1251243003/diff/1/chrome/browser/browsing_data/browsing_data_remover.cc#newcode291 chrome/browser/browsing_data/browsing_data_remover.cc:291: std::set<GURL> restrict_urls; On 2015/07/22 at 23:22:15, Timo Reimann wrote: ...
5 years, 5 months ago (2015-07-23 09:56:50 UTC) #7
Timo Reimann
Patch #3 uploaded which replaces the set of GURLs by a single Origin. Adapted and ...
5 years, 5 months ago (2015-07-23 23:11:07 UTC) #8
Mike West
LGTM % nit. Thanks! https://codereview.chromium.org/1251243003/diff/1/content/browser/download/download_manager_impl.h File content/browser/download/download_manager_impl.h (right): https://codereview.chromium.org/1251243003/diff/1/content/browser/download/download_manager_impl.h#newcode148 content/browser/download/download_manager_impl.h:148: bool IsRestrictedUrl(const GURL& url, On ...
5 years, 5 months ago (2015-07-24 06:56:39 UTC) #9
Timo Reimann
On 2015/07/24 at 06:56:39, mkwst wrote: > LGTM % nit. > > Thanks! > > ...
5 years, 5 months ago (2015-07-24 07:10:45 UTC) #10
Mike West
On 2015/07/24 at 07:10:45, ttr314 wrote: > On 2015/07/24 at 06:56:39, mkwst wrote: > > ...
5 years, 5 months ago (2015-07-24 07:12:11 UTC) #11
Timo Reimann
On 2015/07/24 at 07:12:11, mkwst wrote: > On 2015/07/24 at 07:10:45, ttr314 wrote: > > ...
5 years, 5 months ago (2015-07-24 07:22:10 UTC) #12
Mike West
On 2015/07/24 at 07:22:10, ttr314 wrote: > On 2015/07/24 at 07:12:11, mkwst wrote: > > ...
5 years, 5 months ago (2015-07-24 07:27:04 UTC) #13
Timo Reimann
On 2015/07/24 at 07:27:04, mkwst wrote: > On 2015/07/24 at 07:22:10, ttr314 wrote: > > ...
5 years, 5 months ago (2015-07-24 07:42:20 UTC) #14
Mike West
On 2015/07/24 at 07:42:20, ttr314 wrote: > On 2015/07/24 at 07:27:04, mkwst wrote: > > ...
5 years, 5 months ago (2015-07-24 07:42:48 UTC) #15
Timo Reimann
Final patch set for what we've discussed so far: Adds a TODO and does some ...
5 years, 5 months ago (2015-07-24 08:24:28 UTC) #16
Timo Reimann
@phajdan.jr, would you like to have a look at the DownloadManager changes too? Not sure ...
5 years, 5 months ago (2015-07-24 08:28:30 UTC) #17
Mike West
On 2015/07/24 at 08:28:30, ttr314 wrote: > @phajdan.jr, would you like to have a look ...
5 years, 5 months ago (2015-07-24 08:33:57 UTC) #18
Paweł Hajdan Jr.
https://codereview.chromium.org/1251243003/diff/60001/content/browser/download/download_manager_impl.cc File content/browser/download/download_manager_impl.cc (right): https://codereview.chromium.org/1251243003/diff/60001/content/browser/download/download_manager_impl.cc#newcode592 content/browser/download/download_manager_impl.cc:592: if (IsRemovableURL(download->GetURL(), origin_to_clear) && IsRemovableURL is located far from ...
5 years, 5 months ago (2015-07-24 09:44:17 UTC) #19
Timo Reimann
On 2015/07/24 at 09:44:17, phajdan.jr wrote: > https://codereview.chromium.org/1251243003/diff/60001/content/browser/download/download_manager_impl.cc > File content/browser/download/download_manager_impl.cc (right): > > https://codereview.chromium.org/1251243003/diff/60001/content/browser/download/download_manager_impl.cc#newcode592 ...
5 years, 5 months ago (2015-07-24 14:48:13 UTC) #20
Paweł Hajdan Jr.
On 2015/07/24 at 14:48:13, ttr314 wrote: > On 2015/07/24 at 09:44:17, phajdan.jr wrote: > > ...
5 years, 4 months ago (2015-07-27 10:57:47 UTC) #21
Timo Reimann
On 2015/07/27 at 10:57:47, phajdan.jr wrote: > On 2015/07/24 at 14:48:13, ttr314 wrote: > > ...
5 years, 4 months ago (2015-07-28 00:59:58 UTC) #22
Timo Reimann
Added a final BrowsingDataRemoverTest to verify that the DownloadManager is called with the right origin. ...
5 years, 4 months ago (2015-07-28 01:48:50 UTC) #24
Timo Reimann
On 2015/07/28 at 01:48:50, Timo Reimann wrote: > Added a final BrowsingDataRemoverTest to verify that ...
5 years, 4 months ago (2015-07-30 14:00:30 UTC) #25
Mike West
> Did anyone have had a chance to look at my approach and the issue? ...
5 years, 4 months ago (2015-07-31 15:23:49 UTC) #28
Bernhard Bauer
On 2015/07/31 15:23:49, Mike West (OOO until 10th) wrote: > > Did anyone have had ...
5 years, 4 months ago (2015-07-31 16:36:57 UTC) #29
Timo Reimann
On 2015/07/31 at 16:36:57, bauerb wrote: > On 2015/07/31 15:23:49, Mike West (OOO until 10th) ...
5 years, 4 months ago (2015-08-02 20:57:24 UTC) #33
Charlie Reis
I'm afraid I'm not a good reviewer for DownloadManager. rdsmith@, can you take a look? ...
5 years, 4 months ago (2015-08-03 18:33:19 UTC) #35
Randy Smith (Not in Mondays)
https://codereview.chromium.org/1251243003/diff/140001/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): https://codereview.chromium.org/1251243003/diff/140001/content/public/browser/download_manager.h#newcode120 content/public/browser/download_manager.h:120: // unique origin causes all origins to be removed. ...
5 years, 4 months ago (2015-08-03 19:09:30 UTC) #36
Timo Reimann
Last patch just fixes formatting issues. https://codereview.chromium.org/1251243003/diff/140001/content/public/browser/download_manager.h File content/public/browser/download_manager.h (right): https://codereview.chromium.org/1251243003/diff/140001/content/public/browser/download_manager.h#newcode120 content/public/browser/download_manager.h:120: // unique origin ...
5 years, 4 months ago (2015-08-03 20:09:33 UTC) #37
Randy Smith (Not in Mondays)
On 2015/08/03 20:09:33, Timo Reimann wrote: > Last patch just fixes formatting issues. > > ...
5 years, 4 months ago (2015-08-03 20:16:35 UTC) #38
Timo Reimann
On 2015/08/03 at 20:16:35, rdsmith wrote: > On 2015/08/03 20:09:33, Timo Reimann wrote: > > ...
5 years, 4 months ago (2015-08-03 22:00:00 UTC) #39
Bernhard Bauer
LGTM with a nit below: On 2015/08/03 22:00:00, Timo Reimann wrote: > On 2015/08/03 at ...
5 years, 4 months ago (2015-08-04 07:49:20 UTC) #40
Randy Smith (Not in Mondays)
On 2015/08/03 22:00:00, Timo Reimann wrote: > On 2015/08/03 at 20:16:35, rdsmith wrote: > > ...
5 years, 4 months ago (2015-08-04 12:30:28 UTC) #41
Timo Reimann
On 2015/08/04 at 07:49:20, bauerb wrote: > > (As a side consideration, I wonder if ...
5 years, 4 months ago (2015-08-04 15:00:04 UTC) #42
Timo Reimann
https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc File content/browser/download/download_manager_impl.cc (right): https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc#newcode572 content/browser/download/download_manager_impl.cc:572: static bool IsRemovableURL(const GURL& url, On 2015/08/04 at 07:49:20, ...
5 years, 4 months ago (2015-08-04 15:00:26 UTC) #43
Bernhard Bauer
https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc File content/browser/download/download_manager_impl.cc (right): https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc#newcode572 content/browser/download/download_manager_impl.cc:572: static bool IsRemovableURL(const GURL& url, On 2015/08/04 15:00:26, Timo ...
5 years, 4 months ago (2015-08-04 15:05:06 UTC) #44
Timo Reimann
On 2015/08/04 at 12:30:28, rdsmith wrote: > On 2015/08/03 22:00:00, Timo Reimann wrote: > > ...
5 years, 4 months ago (2015-08-04 15:13:24 UTC) #45
Timo Reimann
Move IsRemovableURL into anonymous namespace.
5 years, 4 months ago (2015-08-04 15:23:17 UTC) #46
Timo Reimann
On 2015/08/04 at 15:05:06, bauerb wrote: > https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc > File content/browser/download/download_manager_impl.cc (right): > > https://codereview.chromium.org/1251243003/diff/160001/content/browser/download/download_manager_impl.cc#newcode572 ...
5 years, 4 months ago (2015-08-04 15:23:47 UTC) #47
Randy Smith (Not in Mondays)
On 2015/08/04 15:13:24, Timo Reimann wrote: > On 2015/08/04 at 12:30:28, rdsmith wrote: > > ...
5 years, 4 months ago (2015-08-04 15:27:33 UTC) #48
Timo Reimann
Add separate method to remove downloads by origin.
5 years, 4 months ago (2015-08-04 22:29:25 UTC) #49
Timo Reimann
On 2015/08/04 at 15:27:33, rdsmith wrote: > On 2015/08/04 15:13:24, Timo Reimann wrote: > > ...
5 years, 4 months ago (2015-08-04 22:36:30 UTC) #50
Randy Smith (Not in Mondays)
*download* LGTM; comments below are suggestions you can take or not as you wish. Thanks! ...
5 years, 4 months ago (2015-08-05 16:02:04 UTC) #51
Timo Reimann
https://codereview.chromium.org/1251243003/diff/200001/content/browser/download/download_manager_impl.h File content/browser/download/download_manager_impl.h (right): https://codereview.chromium.org/1251243003/diff/200001/content/browser/download/download_manager_impl.h#newcode12 content/browser/download/download_manager_impl.h:12: #include "base/callback.h" On 2015/08/05 at 16:02:04, rdsmith wrote: > ...
5 years, 4 months ago (2015-08-05 20:07:46 UTC) #52
Randy Smith (Not in Mondays)
On 2015/08/05 20:07:46, Timo Reimann wrote: > https://codereview.chromium.org/1251243003/diff/200001/content/browser/download/download_manager_impl.h > File content/browser/download/download_manager_impl.h (right): > > https://codereview.chromium.org/1251243003/diff/200001/content/browser/download/download_manager_impl.h#newcode12 ...
5 years, 4 months ago (2015-08-05 20:18:11 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1251243003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1251243003/220001
5 years, 4 months ago (2015-08-05 20:57:19 UTC) #58
commit-bot: I haz the power
All required reviewers (with asterisk prefixes) have not yet approved this CL. No L-G-T-M from ...
5 years, 4 months ago (2015-08-05 20:57:21 UTC) #60
Timo Reimann
On 2015/08/05 at 20:57:21, commit-bot wrote: > All required reviewers (with asterisk prefixes) have not ...
5 years, 4 months ago (2015-08-05 21:00:29 UTC) #62
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1251243003/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1251243003/220001
5 years, 4 months ago (2015-08-05 21:04:47 UTC) #64
Charlie Reis
You still need an owner's review. Now that rdsmith has approved the changes, I can ...
5 years, 4 months ago (2015-08-05 22:19:19 UTC) #65
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-05 22:20:25 UTC) #67
Timo Reimann
Charlie, apologies for almost skipping your review. Somehow I was under the impression that rdsmith ...
5 years, 4 months ago (2015-08-06 01:13:46 UTC) #69
Randy Smith (Not in Mondays)
Quick check: I only reviewed the *download* files. If you're relying on my opinion for ...
5 years, 4 months ago (2015-08-06 15:04:58 UTC) #70
Timo Reimann
On 2015/08/06 at 15:04:58, rdsmith wrote: > Quick check: I only reviewed the *download* files. ...
5 years, 4 months ago (2015-08-06 15:13:11 UTC) #71
Charlie Reis
Thanks! On 2015/08/06 15:13:11, Timo Reimann wrote: > On 2015/08/06 at 15:04:58, rdsmith wrote: > ...
5 years, 4 months ago (2015-08-06 16:25:53 UTC) #72
Timo Reimann
On 2015/08/06 at 16:25:53, creis wrote: > Thanks! > > On 2015/08/06 15:13:11, Timo Reimann ...
5 years, 4 months ago (2015-08-06 17:18:06 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1251243003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1251243003/240001
5 years, 4 months ago (2015-08-06 17:19:34 UTC) #76
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/89778)
5 years, 4 months ago (2015-08-06 18:10:42 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1251243003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1251243003/240001
5 years, 4 months ago (2015-08-06 19:17:54 UTC) #80
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 4 months ago (2015-08-06 20:11:35 UTC) #81
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/81dc54b2ec32a33e6a7081f5537c53dc9863a153 Cr-Commit-Position: refs/heads/master@{#342187}
5 years, 4 months ago (2015-08-06 20:12:12 UTC) #82
battre
Quick questions: Do we want to clear suborigins as well? I skimmed the CL and ...
5 years, 4 months ago (2015-08-07 07:53:28 UTC) #84
Timo Reimann
5 years, 4 months ago (2015-08-08 12:49:08 UTC) #85
Message was sent while issue was closed.
On 2015/08/07 at 07:53:28, battre wrote:
> Quick questions: Do we want to clear suborigins as well? I skimmed the CL and
did not notice a test that verifies that this happens or does not happen.

Assuming sub-origins and sub-domains are the same thing: I think it would
require extending Origin first (or choosing a completely different abstraction)
as the class seems to be able to match on exact hosts only.

It might be easier to focus on exact origins for now and add more flexibility
later. I am very very open though for exploring other directions as well.

Powered by Google App Engine
This is Rietveld 408576698