Fix an issue that opaque origin triggered download is not throttled
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:Xing Liu <xingliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#740375}
Showing
Please register or sign in to comment