Refactor HasTrustTokensAnswerer to use SuitableTrustTokenOrigin
Previously, HasTrustTokensAnswerer enforced preconditions on the url::Origin passed to its constructor by making the constructor private and exposing a static factory method with the potential for failure. We can now enforce this in a cleaner way with the type-safety provided by SuitableTrustTokenOrigin, which allows removing some tests and deduplicating the precondition-checking logic. R=csharrison Bug: 1061116 Change-Id: Ief3776d605d7e64ea70c1fe738cf9725205489a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132598 Commit-Queue: Charlie Harrison <csharrison@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Auto-Submit: David Van Cleve <davidvc@chromium.org> Cr-Commit-Position: refs/heads/master@{#756112}
Showing
Please register or sign in to comment