• Colin Blundell's avatar
    [WebLayer] Show ads blocked infobar when directed by subresource filter · e8831883
    Colin Blundell authored
    This CL adds showing of the (now-componentized) ads blocked infobar in
    WebLayer. This presentation is made in //weblayer's
    SubresourceFilterClientImpl as directed by
    //components/subresource_filter. The implementation is adapted from
    that of //chrome's ChromeSubresourceFilterClient, but simplified:
    - We leave interaction with content settings for followup work
    - We do not track whether the infobar has previously been shown for the
      current navigation. The reason is that
      ContentSubresourceFilterThrottleManager already does such tracking
      itself in its MaybeShowNotification() method, so the client should
      never actually receive a duplicate request to show a notification for
      a given navigation.
    
    We also add a browsertest that the infobar is presented when a resource
    is blocked and is removed when navigating away from the page with a
    blocked resource. Note that while it would be useful to also add tests
    in Java, we can't at this time due to crbug.com/899903.
    
    We leave implementation of the reload functionality that the user can
    trigger via the infobar for a followup CL.
    
    Bug: 1116095
    Change-Id: Icb182143b0d27de5f03efc88ce8013be3c5c91d1
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2563549
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#833308}
    e8831883
grit_strings_allowlist.txt 9.3 KB