chromium/services/network/trust_tokens/expiry_inspecting_record_expiry_delegate.h

// Copyright 2020 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_EXPIRY_INSPECTING_RECORD_EXPIRY_DELEGATE_H_
#define SERVICES_NETWORK_TRUST_TOKENS_EXPIRY_INSPECTING_RECORD_EXPIRY_DELEGATE_H_

#include "base/memory/raw_ptr.h"
#include "services/network/trust_tokens/suitable_trust_token_origin.h"
#include "services/network/trust_tokens/trust_token_store.h"

namespace network {

class SynchronousTrustTokenKeyCommitmentGetter;

// ExpiryInspectingRecordExpiryDelegate considers a redemption record (RR) to
// have expired if:
// - its associated trust token verification key is not present in the token's
// issuer's most recent key commitment, or
// - its issuer is not a valid Trust Tokens issuer (this means the record has
// been corrupted; signaling that it is expired increases the likelihood that
// the caller will evict it from storage).
class ExpiryInspectingRecordExpiryDelegate
    : public TrustTokenStore::RecordExpiryDelegate {};

}  // namespace network

#endif  // SERVICES_NETWORK_TRUST_TOKENS_EXPIRY_INSPECTING_RECORD_EXPIRY_DELEGATE_H_