chromium/third_party/blink/renderer/platform/wtf/shared_buffer.cc

/*
 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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/wtf/shared_buffer.h"

#include <cstddef>
#include <memory>

#include "base/compiler_specific.h"
#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/unicode.h"
#include "third_party/blink/renderer/platform/wtf/text/utf8.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"

namespace WTF {

SegmentedBuffer::Iterator& SegmentedBuffer::Iterator::operator++() {}

SegmentedBuffer::Iterator::Iterator(const SegmentedBuffer* buffer)
    :{}

SegmentedBuffer::Iterator::Iterator(Vector<Segment>::const_iterator segment_it,
                                    size_t offset,
                                    const SegmentedBuffer* buffer)
    :{}

void SegmentedBuffer::Iterator::Init(size_t offset) {}

void SegmentedBuffer::Append(base::span<const char> data) {}

void SegmentedBuffer::Append(Vector<char>&& vector) {}

void SegmentedBuffer::Clear() {}

SegmentedBuffer::Iterator SegmentedBuffer::begin() const {}

SegmentedBuffer::Iterator SegmentedBuffer::end() const {}

SegmentedBuffer::Iterator SegmentedBuffer::GetIteratorAtInternal(
    size_t position) const {}

bool SegmentedBuffer::GetBytesInternal(void* dest, size_t dest_size) const {}

void SegmentedBuffer::GetMemoryDumpNameAndSize(String& dump_name,
                                               size_t& dump_size) const {}

SegmentedBuffer::DeprecatedFlatData::DeprecatedFlatData(
    const SegmentedBuffer* buffer)
    :{}

Vector<Vector<char>> SegmentedBuffer::TakeData() && {}

SharedBuffer::SharedBuffer() = default;

SharedBuffer::SharedBuffer(base::span<const char> data) {}

SharedBuffer::SharedBuffer(base::span<const unsigned char> data)
    :{}

SharedBuffer::SharedBuffer(SegmentedBuffer&& data)
    :{}

SharedBuffer::~SharedBuffer() = default;

scoped_refptr<SharedBuffer> SharedBuffer::Create(Vector<char>&& vector) {}

}  // namespace WTF