• Charlie Harrison's avatar
    [ad-delay] Delay insecure ad subresources · 294b742e
    Charlie Harrison authored
    This CL adds a URLLoaderThrottle to renderer subresource requests
    that delays the navigation by a fixed amount (default 50ms) if it
    detects that the resource request is an insecure (e.g. http) ad
    request.
    
    The URLLoaderThrottle will be re-used in the browser process for
    subframe navigations, so care has been made to fit it in the
    content/common layer.
    
    Some other misc changes to make this happen / testable:
     - Add IsAdResource() to blink::WebURLRequest
     - URLLoaderThrottleProvider changed to take a full blink::WebURLRequest
       instead of a blink::WebURL.
     - TestURLLoaderFactory extended to support redirects.
     - ThrottlingURLLoader partly exposed to content/public/test.
    
    Bug: 829042
    Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
    Change-Id: Ia98891ed8c07a3c85e1f9986c29d841698ed9228
    Reviewed-on: https://chromium-review.googlesource.com/994152
    Commit-Queue: Charlie Harrison <csharrison@chromium.org>
    Reviewed-by: default avatarJosh Karlin <jkarlin@chromium.org>
    Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#549300}
    294b742e
throttling_url_loader_test_util.h 1.18 KB