• Colin Blundell's avatar
    [Subresource Filter] Localize all nav throttle creation in component · 0eb3797c
    Colin Blundell authored
    Subresource filter navigation throttle creation is currently distributed
    between //chrome and //components. This CL moves the //chrome-level
    logic into the //components-level logic in anticipation of reusing this
    logic in WebLayer's subresource filter bringup. Without this change,
    this logic would need to be duplicated unnecessarily in //weblayer.
    
    As part of this change, I add a SubresourceFilterClient method to get
    the SafeBrowsingDatabaseManager. Note that the conditional on whether
    the safe browsing throttle is created would seem to be slightly
    changed: currently it is done if the (//chrome-level)
    SafeBrowsingService is not null, whereas in this CL it is changed to be
    gated on whether the database manager returned by the
    SafeBrowsingService is not null. However, the created throttle already
    assumes that the database manager passed in from SafeBrowsingService is
    not null (cf. SubresourceFilterSafeBrowsingClient), so the new check is
    actually functionally equivalent to the old check (i.e., the database
    manager will be null iff the safe browsing service is null).
    
    Bug: 1116095
    Change-Id: If71e59db4212482d05eb5eb49e50a7bebfee47cb
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440096
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#812618}
    0eb3797c
chrome_content_browser_client.cc 229 KB