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 Review-Url: https://codereview.chromium.org/2554413002 Cr-Commit-Position: refs/heads/master@{#438175}
Showing
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment