// 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 blink.mojom;
import "mojo/public/mojom/base/unguessable_token.mojom";
import "services/network/public/mojom/schemeful_site.mojom";
import "third_party/blink/public/mojom/storage_key/ancestor_chain_bit.mojom";
import "url/mojom/origin.mojom";
// Represents a blink::StorageKey (third_party/blink/common/storage_key).
struct StorageKey {
// The origin of the context using this storage key.
url.mojom.Origin origin;
// The "top-level site"/"top-level frame"/"main frame" of the context using
// this storage key. See storage_key.h for more details.
network.mojom.SchemefulSite top_level_site;
// An optional nonce, forcing a partitioned storage from anything else. Used
// by anonymous iframes:
// https://github.com/camillelamy/explainers/blob/master/anonymous_iframes.md
mojo_base.mojom.UnguessableToken? nonce;
// An enumerated value indicating if any frame in the StorageKey's
// ancestor chain (including the `top_level_site`) is cross-site with the
// current frame (`origin`).
blink.mojom.AncestorChainBit ancestor_chain_bit;
// The value the top_level_site would be if third party partitioning is
// enabled. See storage_key.h for more details.
network.mojom.SchemefulSite top_level_site_if_third_party_enabled;
// The value the ancestor_chain_bit would be if third party partitioning is
// enabled. See storage_key.h for more details.
blink.mojom.AncestorChainBit ancestor_chain_bit_if_third_party_enabled;
};