#include "components/unexportable_keys/unexportable_key_loader.h"
#include <memory>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ref.h"
#include "base/memory/weak_ptr.h"
#include "components/unexportable_keys/background_task_priority.h"
#include "components/unexportable_keys/service_error.h"
#include "components/unexportable_keys/unexportable_key_id.h"
#include "components/unexportable_keys/unexportable_key_service.h"
#include "crypto/signature_verifier.h"
namespace unexportable_keys {
std::unique_ptr<UnexportableKeyLoader>
UnexportableKeyLoader::CreateFromWrappedKey(
UnexportableKeyService& unexportable_key_service,
base::span<const uint8_t> wrapped_key,
BackgroundTaskPriority priority) { … }
std::unique_ptr<UnexportableKeyLoader> UnexportableKeyLoader::CreateWithNewKey(
UnexportableKeyService& unexportable_key_service,
base::span<const crypto::SignatureVerifier::SignatureAlgorithm>
acceptable_algorithms,
BackgroundTaskPriority priority) { … }
UnexportableKeyLoader::~UnexportableKeyLoader() = default;
void UnexportableKeyLoader::InvokeCallbackAfterKeyLoaded(
base::OnceCallback<void(ServiceErrorOr<UnexportableKeyId>)> callback) { … }
ServiceErrorOr<UnexportableKeyId>
UnexportableKeyLoader::GetKeyIdOrErrorForTesting() { … }
UnexportableKeyLoader::State UnexportableKeyLoader::GetStateForTesting() { … }
UnexportableKeyLoader::UnexportableKeyLoader() = default;
void UnexportableKeyLoader::LoadFromWrappedKey(
UnexportableKeyService& unexportable_key_service,
base::span<const uint8_t> wrapped_key,
BackgroundTaskPriority priority) { … }
void UnexportableKeyLoader::GenerateNewKey(
UnexportableKeyService& unexportable_key_service,
base::span<const crypto::SignatureVerifier::SignatureAlgorithm>
acceptable_algorithms,
BackgroundTaskPriority priority) { … }
void UnexportableKeyLoader::OnKeyLoaded(
ServiceErrorOr<UnexportableKeyId> key_id_or_error) { … }
}