// 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. #ifndef SERVICES_NETWORK_TRUST_TOKENS_TRUST_TOKEN_STORE_H_ #define SERVICES_NETWORK_TRUST_TOKENS_TRUST_TOKEN_STORE_H_ #include <map> #include <memory> #include <optional> #include <string> #include <string_view> #include <vector> #include "base/functional/callback.h" #include "base/task/sequenced_task_runner.h" #include "base/time/time.h" #include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/trust_tokens.mojom.h" #include "services/network/trust_tokens/proto/public.pb.h" #include "services/network/trust_tokens/suitable_trust_token_origin.h" #include "services/network/trust_tokens/trust_token_persister.h" #include "services/network/trust_tokens/types.h" namespace network { // A TrustTokenStore provides operations on persistent state necessary for // the various steps of the Trust TrustTokens protocol. // // For more information about the protocol, see the explainer at // https://github.com/WICG/trust-token-api. // // TrustTokenStore translates operations germane to different steps // of token issuance, token redemption, and request signing into // operations in the key-value representation used by the persistence // layer. // // For example, it provides operations: // - checking preconditions for the different protocol steps; // - storing unblinded, signed tokens; and // - managing Redemption Records (RRs). // // TrustTokenStore's methods do minimal precondition checking and, in // particular, only selectively verify protocol-level invariants and // input integrity. class TrustTokenStore { … }; } // namespace network #endif // SERVICES_NETWORK_TRUST_TOKENS_TRUST_TOKEN_STORE_H_