commit | 65d20b8e6b1e34d2687f4367477b92e89867c6f5 | [log] [tgz] |
---|---|---|
author | Yao Xiao <yaoxia@chromium.org> | Thu Dec 05 22:04:20 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Dec 05 22:04:20 2019 |
tree | 1876880cc395b3020ba95a6c5350dc557700e24b | |
parent | 1bd5e8213b4e6cc45bd0b3c32a56bb5b40549e73 [diff] |
Fill in the Network Isolation Key for download request Earlier only some download requests had the NIK set (https://crrev.com/c/1783305) and this CL is increasing the coverage of the type of download requests with NIK set. The rule is summarized as follows: the NIK for any download request is <top frame origin, frame origin> of the document that initiated the download; NIK for navigation resulted download follows the navigation's NIK - i.e. use <top-frame origin, top-frame origin> for top navigation; NIK for download retry/resume/parallel-download follows the original download/navigation requests’ NIK. This CL increases the coverage by putting the NIK in the constructor of DownloadUrlParameters, so that when the ResourceRequest is created in download_utils.cc -> CreateResourceRequest() it can always grab the NIK from the params. Existing tests coverage: <a download>; context menu save-as download; and download resume. TODO 1: In one constructor of DownloadItem it’s supposed to read from history service (disk). We’ll need to persist the NIK also to disk in order to pass it to DownloadItem. This is not implemented in this patch. TODO 2: It’s unclear what is the download request in DownloadDriverImpl::Start. Currently the NIK is left empty as a TODO. Bug: 1003528 Change-Id: I16cc494dc9c9c5a3d1e756954adc8bf9dd96ae26 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919756 Commit-Queue: Yao Xiao <yaoxia@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Min Qin <qinmin@chromium.org> Cr-Commit-Position: refs/heads/master@{#722234}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .