• engedy's avatar
    Transform redirect chains for the Safe Browsing subresource filter. · 6cd4e4e7
    engedy authored
    There has been a discrepancy between how the subresource filter and the rest of
    Safe Browsing defines the meaning of `redirect urls`. For the redirect chain A
    -> B -> C, the SafeBrowsingResourceThrottle considers A as the |original_url|
    and [B, C] as |redirect_urls|.  In contrast, the subresource filter expects C
    as the resource URL and [A, B] as redirect URLs.
    
    This CL performs the correct transformation on the |redirect_urls| list before
    passing it from the SafeBrowsingResourceThrottle to the subresource filter.
    Plus, it also avoid calling out to the ContentSubresourceFilterDriverFactory in
    case the unsafe resource is not a main frame document.
    
    BUG=646800,609747
    
    Review-Url: https://codereview.chromium.org/2339733003
    Cr-Commit-Position: refs/heads/master@{#419373}
    6cd4e4e7
safe_browsing_resource_throttle.cc 16.2 KB