• Min Qin's avatar
    Fix an issue that opaque origin triggered download is not throttled · 220ecb7e
    Min Qin authored
    If a download is triggered by opaque origin, currently we create an origin
    from main WebContents' URL to determine if the download should be blocked.
    However, if main WebContents' URL is also an opaque origin, the newly
    created origin will be different from the previous origin. And making
    the download always allowed.
    This CL fixes the issue by using the originating opaque origin instead
    if the WebContents' origin is opaque. An alternative solution is to
    assign a dedicated opaque origin to the main WebContents.
    
    BUG=1044277
    
    Change-Id: Ia38280f4237ba5cd35c7afcf350734833fb9d002
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048843
    Commit-Queue: Min Qin <qinmin@chromium.org>
    Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#740375}
    220ecb7e
download_request_limiter.cc 26.6 KB