1 // Copyright 2020 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef SERVICES_NETWORK_TRUST_TOKENS_LOCAL_TRUST_TOKEN_OPERATION_DELEGATE_H_ 6 #define SERVICES_NETWORK_TRUST_TOKENS_LOCAL_TRUST_TOKEN_OPERATION_DELEGATE_H_ 7 8 #include "base/callback.h" 9 #include "services/network/public/mojom/trust_tokens.mojom-forward.h" 10 11 namespace network { 12 13 // LocalTrustTokenOperationDelegate provides an interface for executing 14 // Trust Tokens "against the platform," i.e. via some kind of operating system 15 // mediation rather than through the typical method of a direct HTTP request to 16 // a counterparty. 17 class LocalTrustTokenOperationDelegate { 18 public: 19 virtual ~LocalTrustTokenOperationDelegate() = default; 20 21 // FulfillIssuance attempts to execute the given Trust Tokens operation 22 // locally, on conclusion populating |done| with either a response or a 23 // suitable status as described in FulfillTrustTokenIssuanceAnswer's struct 24 // comments. 25 virtual void FulfillIssuance( 26 mojom::FulfillTrustTokenIssuanceRequestPtr request, 27 base::OnceCallback<void(mojom::FulfillTrustTokenIssuanceAnswerPtr)> 28 done) = 0; 29 }; 30 31 } // namespace network 32 33 #endif // SERVICES_NETWORK_TRUST_TOKENS_LOCAL_TRUST_TOKEN_OPERATION_DELEGATE_H_ 34