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}
28 files changed