#include "services/network/trust_tokens/trust_token_key_commitments.h"
#include <optional>
#include <utility>
#include "base/command_line.h"
#include "base/values.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/mojom/trust_tokens.mojom-forward.h"
#include "services/network/trust_tokens/suitable_trust_token_origin.h"
#include "services/network/trust_tokens/trust_token_key_commitment_parser.h"
#include "services/network/trust_tokens/trust_token_key_filtering.h"
#include "services/network/trust_tokens/trust_token_parameterization.h"
namespace network {
namespace {
base::flat_map<SuitableTrustTokenOrigin,
mojom::TrustTokenKeyCommitmentResultPtr>
ParseCommitmentsFromCommandLine() { … }
mojom::TrustTokenKeyCommitmentResultPtr FilterCommitments(
mojom::TrustTokenKeyCommitmentResultPtr result) { … }
}
TrustTokenKeyCommitments::TrustTokenKeyCommitments()
: … { … }
TrustTokenKeyCommitments::~TrustTokenKeyCommitments() = default;
void TrustTokenKeyCommitments::Set(
base::flat_map<url::Origin, mojom::TrustTokenKeyCommitmentResultPtr> map) { … }
void TrustTokenKeyCommitments::ParseAndSet(std::string_view raw_commitments) { … }
void TrustTokenKeyCommitments::Get(
const url::Origin& origin,
base::OnceCallback<void(mojom::TrustTokenKeyCommitmentResultPtr)> done)
const { … }
mojom::TrustTokenKeyCommitmentResultPtr TrustTokenKeyCommitments::GetSync(
const url::Origin& origin) const { … }
}