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

Issue 10413072: Teaching BrowsingDataRemover how to delete application data. (Closed)

Created:
8 years, 7 months ago by Mike West
Modified:
8 years, 6 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, jochen+watch-content_chromium.org, jam, kkania, joi+watch-content_chromium.org, Aaron Boodman, eroman, robertshield, darin-cc_chromium.org, mmenke, jeffreyc
Visibility:
Public.

Description

Teaching BrowsingDataRemover how to delete application data. Adding a parameter to BrowsingDataRemover::Remove in order to support a "Clear app data" flag in the "Clear Browsing Data UI". Additionally, this CL pulls the implementation of DomStorageContext::DeleteDataModifiedSince out of DomStorageContext, and into BrowsingDataRemover in order to manage the complexities of decision-making in the BDR, rather than exporting them out of chrome and into webkit. This patch only addresses localStorage/sessionStorage and quota managed data. Cookies should already ignore the special storage policy, but we'll need to examine the remainder of the types that the BDR touches. BUG=116372 TEST=unit_tests,test_shell_tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140273

Patch Set 1 #

Total comments: 10

Patch Set 2 : Jochen's feedback. #

Patch Set 3 : Dropping enum. #

Patch Set 4 : Inadvertant include. #

Total comments: 4

Patch Set 5 : Ugh. #

Total comments: 2

Patch Set 6 : How's this direction? #

Total comments: 34

Patch Set 7 : Bernhard & Michael's feedback. #

Patch Set 8 : Mac platform fix. #

Total comments: 2

Patch Set 9 : Bernhard #2. #

Total comments: 6

Patch Set 10 : Feedback. #

Total comments: 2

Patch Set 11 : Bernhard. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -112 lines) Patch
M chrome/browser/automation/automation_provider.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/browsing_data_helper.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data_helper.cc View 1 2 3 4 5 6 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +70 lines, -1 line 0 comments Download
M chrome/browser/browsing_data_remover.h View 1 2 3 4 5 6 7 8 9 9 chunks +26 lines, -9 lines 0 comments Download
M chrome/browser/browsing_data_remover.cc View 1 2 3 4 5 6 7 8 9 12 chunks +72 lines, -25 lines 0 comments Download
M chrome/browser/browsing_data_remover_unittest.cc View 1 2 3 4 5 6 7 8 9 26 chunks +261 lines, -39 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/browsing_data/browsing_data_api.cc View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options2/clear_browser_data_handler2.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/dom_storage/dom_storage_context_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -9 lines 0 comments Download
M content/public/browser/dom_storage_context.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M webkit/dom_storage/dom_storage_context.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M webkit/dom_storage/dom_storage_context.cc View 1 2 3 4 5 1 chunk +0 lines, -14 lines 0 comments Download
M webkit/dom_storage/dom_storage_context_unittest.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
Mike West
Hi Jochen and Bernhard! Can you take a look at this patch? Once you're happy, ...
8 years, 7 months ago (2012-05-23 10:58:39 UTC) #1
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/10413072/diff/1/content/browser/dom_storage/dom_storage_context_impl.cc File content/browser/dom_storage/dom_storage_context_impl.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/1/content/browser/dom_storage/dom_storage_context_impl.cc#newcode136 content/browser/dom_storage/dom_storage_context_impl.cc:136: void DOMStorageContextImpl::DeleteDataModifiedSince(const base::Time& cutoff, nit. all arguments should go ...
8 years, 7 months ago (2012-05-23 11:02:20 UTC) #2
Bernhard Bauer
https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h File chrome/browser/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h#newcode128 chrome/browser/browsing_data_remover.h:128: void Remove(int remove_mask, RemoveOriginSet origin_set); Is there a reason ...
8 years, 7 months ago (2012-05-23 11:13:11 UTC) #3
Mike West
Thanks to you both. https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h File chrome/browser/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h#newcode128 chrome/browser/browsing_data_remover.h:128: void Remove(int remove_mask, RemoveOriginSet origin_set); ...
8 years, 7 months ago (2012-05-23 11:23:50 UTC) #4
Bernhard Bauer
https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h File chrome/browser/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10413072/diff/1/chrome/browser/browsing_data_remover.h#newcode128 chrome/browser/browsing_data_remover.h:128: void Remove(int remove_mask, RemoveOriginSet origin_set); On 2012/05/23 11:23:51, Mike ...
8 years, 7 months ago (2012-05-23 11:31:40 UTC) #5
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/10413072/diff/1/webkit/dom_storage/dom_storage_context.cc File webkit/dom_storage/dom_storage_context.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/1/webkit/dom_storage/dom_storage_context.cc#newcode107 webkit/dom_storage/dom_storage_context.cc:107: !special_storage_policy_->IsStorageProtected(infos[i].origin)) { On 2012/05/23 11:23:51, Mike West (chromium) wrote: ...
8 years, 7 months ago (2012-05-23 11:38:35 UTC) #6
Mike West
> ok, if that's the desired behavior meanwhile. We used to do that in the ...
8 years, 7 months ago (2012-05-23 11:42:55 UTC) #7
jochen (gone - plz use gerrit)
On 2012/05/23 11:42:55, Mike West (chromium) wrote: > > ok, if that's the desired behavior ...
8 years, 7 months ago (2012-05-23 11:45:56 UTC) #8
Mike West
> The advantage of seeing that the value is a single bit is that you ...
8 years, 7 months ago (2012-05-23 12:03:18 UTC) #9
Mike West
Hello, potential reviewers! This CL adds an argument to BrowsingDataRemover::Remove, and touches a bit of ...
8 years, 7 months ago (2012-05-23 12:33:28 UTC) #10
Mike West
Actually adding avi@. Hi!
8 years, 7 months ago (2012-05-23 12:33:53 UTC) #11
Avi (use Gerrit)
content lgtm
8 years, 7 months ago (2012-05-23 15:44:54 UTC) #12
michaeln
domstorage change lgtm although you should probably be prepared for some fallout regarding the deletion ...
8 years, 7 months ago (2012-05-23 20:36:18 UTC) #13
Evan Stade
https://chromiumcodereview.appspot.com/10413072/diff/12002/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc File chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/12002/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc#newcode494 chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc:494: include_protected_origins); I'd prefer false); // include_protected_origins or at least ...
8 years, 7 months ago (2012-05-23 23:13:27 UTC) #14
Mike West
Shockingly, the task has changed. Bernhard, Jochen, could you take another look at the BDR ...
8 years, 7 months ago (2012-05-24 10:54:24 UTC) #15
jochen (gone - plz use gerrit)
https://chromiumcodereview.appspot.com/10413072/diff/22001/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc File chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/22001/chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc#newcode492 chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc:492: browsing_data_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA, all arguments on separate lines, or align them ...
8 years, 7 months ago (2012-05-24 11:34:04 UTC) #16
Mike West
Revising this a lot based on Jochen's note. Don't worry about reviewing it until the ...
8 years, 7 months ago (2012-05-24 19:04:38 UTC) #17
michaeln
On 2012/05/24 19:04:38, Mike West (chromium) wrote: > Revising this a lot based on Jochen's ...
8 years, 7 months ago (2012-05-24 20:11:58 UTC) #18
Mike West
> Maybe we should invert the control flow for DomStorage similarly. Ask > DomStorageContext for ...
8 years, 7 months ago (2012-05-24 20:37:56 UTC) #19
Mike West
Circling back to this after a few days of being buried elsewhere. Jochen, Bernhard, what ...
8 years, 6 months ago (2012-05-31 14:19:32 UTC) #20
Bernhard Bauer
https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_helper.cc File chrome/browser/browsing_data_helper.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_helper.cc#newcode55 chrome/browser/browsing_data_helper.cc:55: if (!BrowsingDataHelper::HasValidScheme(origin.GetOrigin()) && Could you change this check to ...
8 years, 6 months ago (2012-05-31 15:57:30 UTC) #21
michaeln
https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_remover.cc File chrome/browser/browsing_data_remover.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_remover.cc#newcode617 chrome/browser/browsing_data_remover.cc:617: dom_storage_context_->GetAllStorageFiles( The return type for this method pains me... ...
8 years, 6 months ago (2012-05-31 22:49:06 UTC) #22
michaeln
Or just a review https://chromiumcodereview.appspot.com/10449103/ for those changes
8 years, 6 months ago (2012-05-31 23:40:46 UTC) #23
michaeln
http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_remover.cc File chrome/browser/browsing_data_remover.cc (right): http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_remover.cc#newcode328 chrome/browser/browsing_data_remover.cc:328: base::Bind(&BrowsingDataRemover::ClearLocalStorageOnIOThread, Also, its fine to call the DSC methods ...
8 years, 6 months ago (2012-06-01 03:13:39 UTC) #24
Mike West
This is looking better, thanks for the feedback so far. FYI, this change now depends ...
8 years, 6 months ago (2012-06-01 13:35:16 UTC) #25
Bernhard Bauer
http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_helper.h File chrome/browser/browsing_data_helper.h (right): http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_helper.h#newcode25 chrome/browser/browsing_data_helper.h:25: UNPROTECTED_WEB = 1 << 0, // drive-by web. On ...
8 years, 6 months ago (2012-06-01 13:59:35 UTC) #26
Mike West
Danke! http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_helper.h File chrome/browser/browsing_data_helper.h (right): http://codereview.chromium.org/10413072/diff/24002/chrome/browser/browsing_data_helper.h#newcode25 chrome/browser/browsing_data_helper.h:25: UNPROTECTED_WEB = 1 << 0, // drive-by web. ...
8 years, 6 months ago (2012-06-01 14:11:51 UTC) #27
Evan Stade
lgtm http://codereview.chromium.org/10413072/diff/36004/chrome/browser/browsing_data_helper.h File chrome/browser/browsing_data_helper.h (right): http://codereview.chromium.org/10413072/diff/36004/chrome/browser/browsing_data_helper.h#newcode25 chrome/browser/browsing_data_helper.h:25: UNPROTECTED_WEB = 1 << 0, // drive-by web. ...
8 years, 6 months ago (2012-06-01 17:17:02 UTC) #28
michaeln
DSC usage lgtm https://chromiumcodereview.appspot.com/10413072/diff/36004/chrome/browser/browsing_data_remover.cc File chrome/browser/browsing_data_remover.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/36004/chrome/browser/browsing_data_remover.cc#newcode610 chrome/browser/browsing_data_remover.cc:610: void BrowsingDataRemover::ClearLocalStorageOnIOThread() { it'd be fine ...
8 years, 6 months ago (2012-06-01 20:59:36 UTC) #29
Mike West
Bernhard, if I address Michael's two remaining points (switch to the UI thread, and change ...
8 years, 6 months ago (2012-06-04 06:42:08 UTC) #30
Bernhard Bauer
LGTM https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_helper_unittest.cc File chrome/browser/browsing_data_helper_unittest.cc (right): https://chromiumcodereview.appspot.com/10413072/diff/24002/chrome/browser/browsing_data_helper_unittest.cc#newcode87 chrome/browser/browsing_data_helper_unittest.cc:87: EXPECT_FALSE(Match(kOrigin1, kUnprotected, mock_policy)); On 2012/06/01 14:11:53, Mike West ...
8 years, 6 months ago (2012-06-04 09:06:43 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/10413072/66003
8 years, 6 months ago (2012-06-04 09:35:09 UTC) #32
commit-bot: I haz the power
8 years, 6 months ago (2012-06-04 10:41:11 UTC) #33
Change committed as 140273

Powered by Google App Engine
This is Rietveld 408576698