chromium/third_party/blink/public/common/safe_url_pattern_mojom_traits.h

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

#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_SAFE_URL_PATTERN_MOJOM_TRAITS_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_SAFE_URL_PATTERN_MOJOM_TRAITS_H_

#include <string_view>

#include "mojo/public/cpp/bindings/struct_traits.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/safe_url_pattern.h"
#include "third_party/blink/public/mojom/safe_url_pattern.mojom.h"
#include "third_party/liburlpattern/pattern.h"

namespace mojo {
namespace internal {

inline std::string_view TruncateString(const std::string& string) {}

}  // namespace internal

template <>
struct BLINK_COMMON_EXPORT
    EnumTraits<blink::mojom::Modifier, ::liburlpattern::Modifier> {};

template <>
struct BLINK_COMMON_EXPORT
    StructTraits<blink::mojom::FixedPatternDataView, ::liburlpattern::Part> {};

template <>
struct BLINK_COMMON_EXPORT
    StructTraits<blink::mojom::WildcardPatternDataView, ::liburlpattern::Part> {};

template <>
struct BLINK_COMMON_EXPORT
    UnionTraits<blink::mojom::PatternTemplateDataView, ::liburlpattern::Part> {};

template <>
struct BLINK_COMMON_EXPORT
    StructTraits<blink::mojom::SafeUrlPatternPartDataView,
                 ::liburlpattern::Part> {};

template <>
struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::SafeUrlPatternDataView,
                                        ::blink::SafeUrlPattern> {};

template <>
struct BLINK_COMMON_EXPORT
    StructTraits<blink::mojom::SafeUrlPatternOptionsDataView,
                 blink::SafeUrlPatternOptions> {};

}  // namespace mojo

#endif  // THIRD_PARTY_BLINK_PUBLIC_COMMON_SAFE_URL_PATTERN_MOJOM_TRAITS_H_