chromium/components/enterprise/client_certificates/core/upload_client_error.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_ENTERPRISE_CLIENT_CERTIFICATES_CORE_UPLOAD_CLIENT_ERROR_H_
#define COMPONENTS_ENTERPRISE_CLIENT_CERTIFICATES_CORE_UPLOAD_CLIENT_ERROR_H_

#include <string_view>

#include "base/types/expected.h"

namespace client_certificates {

// Captures terminal client-failure states (happening before even trying to
// upload) of the upload client flows. Do not reorder values as they are used in
// histograms logging (CertificateUploadClientError in enums.xml).
enum class UploadClientError {};

HttpCodeOrClientError;

UploadClientErrorOr;

std::string_view UploadClientErrorToString(UploadClientError error);

}  // namespace client_certificates

#endif  // COMPONENTS_ENTERPRISE_CLIENT_CERTIFICATES_CORE_UPLOAD_CLIENT_ERROR_H_