| // Copyright 2019 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; |
| |
| import "mojo/public/mojom/base/unguessable_token.mojom"; |
| import "services/network/public/mojom/network_isolation_partition.mojom"; |
| import "services/network/public/mojom/schemeful_site.mojom"; |
| |
| // Used to represent an empty `net::NetworkIsolationKey`. |
| struct EmptyNetworkIsolationKey { |
| }; |
| |
| // This struct is used for NetworkIsolationKeys that aren't empty. |
| struct NonEmptyNetworkIsolationKey { |
| |
| // The top-level site of the `net::NetworkIsolationKey`. |
| SchemefulSite top_frame_site; |
| |
| // The frame site of the `net::NetworkIsolationKey`. |
| SchemefulSite frame_site; |
| |
| // A nonce indicating that the `net::NetworkIsolationKey` should always be |
| // considered transient (and therefore, ineligible for having corresponding |
| // resources cached by the HTTP cache). This value will only be set in cases |
| // where the `net::NetworkIsolationKey` was created with a nonce. |
| mojo_base.mojom.UnguessableToken? nonce; |
| |
| NetworkIsolationPartition network_isolation_partition; |
| }; |
| |
| // Mapped to `net::NetworkIsolationKey`. |
| union NetworkIsolationKey { |
| EmptyNetworkIsolationKey empty; |
| NonEmptyNetworkIsolationKey non_empty; |
| }; |