• Colin Blundell's avatar
    [Subresource Filter]: Abstract history dep from ContentSettingsManager · 44fe89f6
    Colin Blundell authored
    WebLayer does not use //components/history and does not want to take a
    dep on the (large) component, as every dep that WebLayer adds has an
    impact on WebView. SubresourceFilterContentSettingsManager, however,
    currently depends on //components/history for its optional observance of
    the user's deletion of URLs from history.
    
    This CL abstracts that dependency via the following changes:
    - Adds the ability for SubresourceFilterProfileContext to store opaque
      embedder data (via a simple
      SubresourceFilterProfileContext::EmbedderData interface)
    - Moves the history observance to a new SubresourceFilterHistoryObserver
      class that is an EmbedderData and takes in a
      SubresourceFilterContentSettingsManager instance to call into
    - Has SubresourceFilterProfileContextFactory create
      SubresourceFilterHistoryObserver instances to be stored by
      SubresourceFilterProfileContext instances
    
    In this way, WebLayer will be able to use
    SubresourceFilterProfileContext, AdsInterventionManager, and
    SubresourceFilterContentSettingsManager without taking on the
    //components/history dep.
    
    Bug: 1116095
    Change-Id: Ic81f63447f10afef1c4946ca7751d810d0a9cbbb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466761Reviewed-by: default avatarEric Robinson <ericrobinson@chromium.org>
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#817020}
    44fe89f6
BUILD.gn 303 KB