Set Sec-Fetch-Mode
from the network service.
#18838
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to move
Sec-Fetch-Mode
into the network service to ensurethat it's consistently set every time
Sec-Fetch-Site
is set, thispatch does a few things:
Based on the conversation in 1 and 2, this patch extends
network::mojom::RequestMode
to include two new values torepresent nested navigations and object/embed navigations as
distinct from main-frame navigations.
It introduces a new
network::IsNavigationRequestMode()
functionto replace direct comparisons to
kNavigate
in various parts ofthe codebase.
It refactors
network::SetSecFetchSiteHeader()
intonetwork::SetFetchMetadataHeaders()
. This creates a single entrypoint from
URLLoader
to set all Fetch Metadata headers, andfleshes out the
Sec-Fetch-Mode
header.Bug: 972263, 990864
Change-Id: Icd20c7640d3d08ecb34a739f0203140fdcc195d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1780725
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Łukasz Anforowicz <[email protected]>
Commit-Queue: Mike West <[email protected]>
Cr-Commit-Position: refs/heads/master@{#693517}