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

// Copyright 2022 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_COOKIE_MANAGER_SHARED_MOJOM_TRAITS_H_
#define SERVICES_NETWORK_PUBLIC_CPP_COOKIE_MANAGER_SHARED_MOJOM_TRAITS_H_

#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/base/schemeful_site.h"
#include "net/cookies/cookie_inclusion_status.h"
#include "net/cookies/site_for_cookies.h"
#include "services/network/public/cpp/schemeful_site_mojom_traits.h"
#include "services/network/public/mojom/cookie_manager.mojom-shared.h"
#include "services/network/public/mojom/site_for_cookies.mojom-shared.h"

namespace mojo {

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_COOKIES)
    StructTraits<network::mojom::SiteForCookiesDataView, net::SiteForCookies> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_COOKIES)
    EnumTraits<network::mojom::CookieExemptionReason,
               net::CookieInclusionStatus::ExemptionReason> {};

template <>
struct COMPONENT_EXPORT(NETWORK_CPP_COOKIES)
    StructTraits<network::mojom::CookieInclusionStatusDataView,
                 net::CookieInclusionStatus> {};

}  // namespace mojo

#endif  // SERVICES_NETWORK_PUBLIC_CPP_COOKIE_MANAGER_SHARED_MOJOM_TRAITS_H_