• msramek's avatar
    Move HISTORY and PASSWORDS from BrowsingDataRemover to the delegate · 8733eb80
    msramek authored
    In https://codereview.chromium.org/2554413002/, BrowsingDataRemover was
    split into content-related and embedder-specific datatypes
    (BrowsingDataRemover[Impl] and [Chrome]BrowsingDataRemoverDelegate,
    respectively).
    
    The split was done according to where the relevant data storage backends
    resided. This CL intends to make the split more precise by looking at it
    more semantically.
    
    1. While SSLHostStateDelegate lives in content/, it's state is deleted
       as a part of the HISTORY datatype, which is not a content/ concept.
       Therefore, this was moved to ChromeBrowsingDataRemoverDelegate.
    
    2. The DCHECK verifying that all UI entrypoints to history deletion
       were disabled if !|may_delete_history| was also moved to
       ChromeBrowsingDataRemoverDelegate, as UI is also not a content/
       concept.
    
    3. The deletion of auth cache is done in BrowsingDataRemoverDelegate
       for both the COOKIES and PASSWORDS datatypes. However, PASSWORDS
       are not a content/ concept. Therefore, BrowsingDataRemoverImpl now
       deletes the auth cache for COOKIES, and
       ChromeBrowsingDataRemoverDelegate for PASSWORDS. This is currently
       done by the duplication of the code, as some duplication is
       necessary anyway, and only about ~10 lines of code are duplicated
       unnecessarily; this seems to be too few to justify creating a new
       file in content/public to be shared between content/ and chrome/.
    
       TODO: This is the second duplication between the two classes. If
       this keeps happenning, consider putting the shared functionality
       to content/public anyway.
    
    BUG=668114
    
    Review-Url: https://codereview.chromium.org/2617403005
    Cr-Commit-Position: refs/heads/master@{#443233}
    8733eb80
browsing_data_remover_impl.cc 27.6 KB