| // Copyright 2021 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module network.mojom; |
| |
| union TimingAllowOrigin { |
| // Per https://fetch.spec.whatwg.org/#concept-tao-check, the parsed values |
| // are either an origin or "null". Normally, this would suggest that an |
| // array of strongly-typed url.mojom.Origins should be used. |
| // |
| // However, https://fetch.spec.whatwg.org/#concept-tao-check defines the |
| // actual check by comparing the serialized origin against the parsed values. |
| // In this world, it's simpler to just pass around the literal parsed values, |
| // as that eliminates the need to validate that explicitly-specified origins |
| // are tuple origins or perform special checks for opaque origins. |
| array<string> serialized_origins; |
| // Note: the actual value is irrelevant here; this is just to create a |
| // distinct union subtype. |
| // TODO(crbug.com/40643013): Replace this with a real placeholder type. |
| uint8 all; |
| }; |