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

Issue 2554413002: Extract embedder-specific data types from BrowsingDataRemover (Closed)

Created:
4 years ago by msramek
Modified:
4 years ago
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extract embedder-specific data types from BrowsingDataRemover Define BrowsingDataRemoverDelegate, a class to which BrowsingDataRemover will delegate all embedder-specific deletions. This class is in 1:1 relationship to BrowsingDataRemover and is owned by it. Create a Chrome-specific subclass ChromeBrowsingDataRemoverDelegate by extracting all Chrome datatypes from BrowsingDataRemover::RemoveImpl(). This is the first step of the implementation plan. See the design doc for more background and explanation of the next steps: https://docs.google.com/document/d/1I6m4QwbTNhG6wdtazamhTnArJN-UMUGqpvwH6InBEaM/edit#heading=h.m5pzu7ah79n9 This change is covered by BrowsingDataRemoverTest and BrowsingDataRemoverBrowserTest. NOTES FOR REVIEWERS: 1. This CL tries to keep the diffs at minimum for easier review, even if the method ordering could be improved. That will be improved in a follow-up CL. 2. However, the diffs widely differ in BrowsingDataRemover::RemoveImpl and ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData. Fortunately, one can convince themself that they are still equivalent by trusting the test coverage (58 unittests and 6 browsertests). 3. One can convince themself that no datatype was left out by checking the list of asynchronous tasks, such as "waiting_for_clear_cache_", "waiting_for_clear_cookies_" etc. present in both .h files and in the AllDone() method of both classes. 4. The distribution of datatypes might not be final. For example, downloads are known to content but have a chrome/ dependency. Similarly, the DNS cache lives in net/ but is retrieved via a class in chrome/. Future CLs might correct their placement based on how strong the chrome/ dependencies are. Patchset 3: Simplify the "bool waiting_for_clear_<type>" paradigm by encapsulating it to a SubTask class. BUG=668114 Committed: https://crrev.com/3248025c236a2f55f79ff58f696b500f8787f28a Cr-Commit-Position: refs/heads/master@{#438175}

Patch Set 1 #

Patch Set 2 : Android fix #

Total comments: 5

Patch Set 3 : SubTask class #

Patch Set 4 : Another Android fix. #

Patch Set 5 : Rebase, manual merge of https://codereview.chromium.org/2566123002/ into CBDRC.cc #

Total comments: 4

Patch Set 6 : Addressed nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1260 lines, -1114 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 1 2 9 chunks +53 lines, -168 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 2 3 4 5 22 chunks +166 lines, -943 lines 0 comments Download
A chrome/browser/browsing_data/browsing_data_remover_delegate.h View 1 chunk +23 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_factory.cc View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
A chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h View 1 2 1 chunk +149 lines, -0 lines 0 comments Download
A chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc View 1 2 3 4 1 chunk +856 lines, -0 lines 0 comments Download

Messages

Total messages: 76 (68 generated)
msramek
Hi Bernhard and Mike! Here comes the first - and the messiest (!) - CL ...
4 years ago (2016-12-09 17:00:48 UTC) #33
Bernhard Bauer
Looks pretty good! Just a small nit, and a suggestion for moar refactorings: https://codereview.chromium.org/2554413002/diff/140001/chrome/browser/browsing_data/browsing_data_remover_unittest.cc File ...
4 years ago (2016-12-12 14:52:06 UTC) #40
msramek
https://codereview.chromium.org/2554413002/diff/140001/chrome/browser/browsing_data/browsing_data_remover_unittest.cc File chrome/browser/browsing_data/browsing_data_remover_unittest.cc (right): https://codereview.chromium.org/2554413002/diff/140001/chrome/browser/browsing_data/browsing_data_remover_unittest.cc#newcode1132 chrome/browser/browsing_data/browsing_data_remover_unittest.cc:1132: std::unique_ptr<WebappRegistry>(new TestWebappRegistry())); On 2016/12/12 14:52:06, Bernhard Bauer wrote: > ...
4 years ago (2016-12-12 20:48:57 UTC) #47
Bernhard Bauer
Awesome, thanks! LGTM with one nit, the rest is optimizations we could do in a ...
4 years ago (2016-12-13 13:26:22 UTC) #64
msramek
Thanks Bernhard! I addressed the nit, and the rest of the optimizations I would indeed ...
4 years ago (2016-12-13 14:21:51 UTC) #67
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/2554413002/260001
4 years ago (2016-12-13 14:22:19 UTC) #71
commit-bot: I haz the power
Committed patchset #6 (id:260001)
4 years ago (2016-12-13 15:35:52 UTC) #74
commit-bot: I haz the power
4 years ago (2016-12-13 15:38:29 UTC) #76
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3248025c236a2f55f79ff58f696b500f8787f28a
Cr-Commit-Position: refs/heads/master@{#438175}

Powered by Google App Engine
This is Rietveld 408576698