Add Trust Tokens parameters to ResourceRequest.
This is the first of a series of two CLs expanding the Fetch API, when the runtime-enabled feature "TrustTokens" is enabled, to include a new experimental parameter `trustTokens` denoting a request to execute a Trust Tokens protocol step (https://github.com/wicg/trust-token-api) alongside the fetch at hand, by adding request headers and processing corresponding response headers. This is an experimental interface planned to be used in an origin trial. This CL implements the network service side of the data flow, by creating a Mojo struct representing the new Fetch parameter and adding a member of this type to ResourceRequest. The second, concurrent, CL (crrev.com/c/2036648) adds code to Blink to implement the JS binding and pass the data from the binding to the network::ResourceRequest field. Notes: - URLLoader will inspect requests' trust_token_params members and destinations, using these to make a decision about whether to execute Trust Tokens logic against the request. - The Mojo struct is "flat" (no pointer members) in order to be trivially copyable, since ResourceRequest requires this property of its members. serialization/deserialization of the mojom struct. Test: Expands URLRequestMojomTraits unit tests to test Bug: 1043118 Change-Id: Icc49ca2fe4a215330c8a9efdb36f4e050d41d05f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067803Reviewed-by:Robert Sesek <rsesek@chromium.org> Reviewed-by:
Yutaka Hirano <yhirano@chromium.org> Commit-Queue: David Van Cleve <davidvc@chromium.org> Cr-Commit-Position: refs/heads/master@{#746043}
Showing
Please register or sign in to comment