From 74eea417676a7bb334db7a02c18ff9a9ac75210b Mon Sep 17 00:00:00 2001 From: Mike West Date: Wed, 4 Sep 2019 07:09:41 -0700 Subject: [PATCH] [WIP] Set `Sec-Fetch-Mode` from the network service. In order to move `Sec-Fetch-Mode` into the network service to ensure that it's consistently set every time `Sec-Fetch-Site` is set, this patch does a few things: 1. Based on the conversation in [1] and [2], this patch extends `network::mojom::RequestMode` to include two new values to represent nested navigations and object/embed navigations as distinct from main-frame navigations. 2. It introduces a new `network::IsNavigationRequestMode()` function to replace direct comparisons to `kNavigate` in various parts of the codebase. 3. It refactors `network::SetSecFetchSiteHeader()` into `network::SetFetchMetadataHeaders()`. This creates a single entry point from `URLLoader` to set all Fetch Metadata headers, and fleshes out the `Sec-Fetch-Mode` header. [1]: https://github.com/w3c/webappsec-fetch-metadata/issues/37 [2]: https://github.com/whatwg/fetch/issues/755 Bug: 972263, 990864 Change-Id: Icd20c7640d3d08ecb34a739f0203140fdcc195d5 --- .../appcache.tentative.https.sub.html | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 fetch/sec-metadata/appcache.tentative.https.sub.html diff --git a/fetch/sec-metadata/appcache.tentative.https.sub.html b/fetch/sec-metadata/appcache.tentative.https.sub.html new file mode 100644 index 000000000000000..a2dc8e5dfd5aa5d --- /dev/null +++ b/fetch/sec-metadata/appcache.tentative.https.sub.html @@ -0,0 +1,22 @@ + + + + + + + +