chromium/third_party/blink/renderer/platform/mojo/string16_mojom_traits.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/mojo/string16_mojom_traits.h"

#include <cstring>

#include "base/containers/span.h"
#include "base/strings/latin1_string_conversions.h"
#include "mojo/public/cpp/base/big_buffer.h"
#include "mojo/public/cpp/base/big_buffer_mojom_traits.h"

namespace mojo {

MaybeOwnedString16::MaybeOwnedString16(std::u16string owned_storage)
    :{}

MaybeOwnedString16::MaybeOwnedString16(base::span<const uint16_t> unowned)
    :{}

MaybeOwnedString16::~MaybeOwnedString16() = default;

// static
MaybeOwnedString16 StructTraits<mojo_base::mojom::String16DataView,
                                WTF::String>::data(const WTF::String& input) {}

// static
bool StructTraits<mojo_base::mojom::String16DataView, WTF::String>::Read(
    mojo_base::mojom::String16DataView data,
    WTF::String* out) {}

// static
mojo_base::BigBuffer StructTraits<mojo_base::mojom::BigString16DataView,
                                  WTF::String>::data(const WTF::String& input) {}

// static
bool StructTraits<mojo_base::mojom::BigString16DataView, WTF::String>::Read(
    mojo_base::mojom::BigString16DataView data,
    WTF::String* out) {}

}  // namespace mojo