Refactor Trust Tokens helpers to use SuitableTrustTokenOrigin
Previously, the Trust Tokens request helpers enforced a collection of uniform preconditions on their issuer and top frame origins via DCHECKs. These were both conceptually enforced at the level "immediately above" the factories (the request helper factory: crrev.com/c/2097057). This CL makes a couple changes: 1. it removes the top frame origin DCHECKs and enforces the top frame origins' constraints by requiring SuitableTrustTokenOrigin-typed top frame origins; the type itself enforces the preconditions. 2. it moves the issuer origin checks conceptually into the request helpers themselves, because the source of the issuer origin varies from operation to operation (for issuance and redemption, it's the request's destination URL; for signing, it's an additional parameter). R=csharrison Test: Expand unittests to cover unsuitable issuer origins. Bug: 1042962 Change-Id: I8f0125eb796c3421bf082ea22fb1fe5f0f85007e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134588 Commit-Queue: David Van Cleve <davidvc@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Auto-Submit: David Van Cleve <davidvc@chromium.org> Cr-Commit-Position: refs/heads/master@{#756367}
Showing
This diff is collapsed.
Please register or sign in to comment