DownloadURLParameters: Remove NetworkIsolationKey parameter.
Downloads are currently treated as main frame navigations, with respect
to same-site-cookies, but as subresources, with respect to
NetworkIsolationKey. This means we don't gain any cross-site tracking
protections as a result of the NIK, and there are often mismatches
between NIKs and their site-for-cookies values.
This CL makes downloads act like navigations with respect to
NetworkIsolationKey, to mirror the site-for-cookies behavior. This
does mean that downloads leak data across sites, and we may want to
address this in the future, but for now, we should at least be
consistent, since NIK and site-for-cookies are similar concepts, and
should have complementary behavior.
This is one of several CLs aimed at letting us DCHECK that NIK and
site-for-cookies are consistent.
Change-Id: I6e35d189c87dc6b04b35ca4ef16170e65a07f990
Fixed: 1046453
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050987
Reviewed-by: Min Qin <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Shivani Sharma <[email protected]>
Commit-Queue: Matt Menke <[email protected]>
Cr-Commit-Position: refs/heads/master@{#747743}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0e43f7f..91371c7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4067,8 +4067,7 @@
auto params = std::make_unique<download::DownloadUrlParameters>(
url, frame_host->GetProcess()->GetID(),
frame_host->GetRenderViewHost()->GetRoutingID(),
- frame_host->GetRoutingID(), traffic_annotation,
- frame_host->GetNetworkIsolationKey());
+ frame_host->GetRoutingID(), traffic_annotation);
params->set_referrer(referrer.url);
params->set_referrer_policy(
Referrer::ReferrerPolicyForUrlRequest(referrer.policy));