chromium/services/network/public/cpp/digitally_signed_mojom_traits.h

// Copyright 2018 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_PUBLIC_CPP_DIGITALLY_SIGNED_MOJOM_TRAITS_H_
#define SERVICES_NETWORK_PUBLIC_CPP_DIGITALLY_SIGNED_MOJOM_TRAITS_H_

#include "base/containers/span.h"
#include "base/notreached.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/cert/signed_certificate_timestamp.h"
#include "services/network/public/mojom/digitally_signed.mojom.h"

namespace mojo {

template <>
struct EnumTraits<network::mojom::HashAlgorithm,
                  net::ct::DigitallySigned::HashAlgorithm> {};

template <>
struct EnumTraits<network::mojom::SignatureAlgorithm,
                  net::ct::DigitallySigned::SignatureAlgorithm> {};

template <>
struct StructTraits<network::mojom::DigitallySignedDataView,
                    net::ct::DigitallySigned> {};

}  // namespace mojo

#endif  // SERVICES_NETWORK_PUBLIC_CPP_DIGITALLY_SIGNED_MOJOM_TRAITS_H_