#include "base/memory/ref_counted_memory.h"
#include <utility>
#include "base/check_op.h"
#include "base/memory/read_only_shared_memory_region.h"
namespace base {
bool RefCountedMemory::Equals(
const scoped_refptr<RefCountedMemory>& other) const { … }
RefCountedMemory::RefCountedMemory() = default;
RefCountedMemory::~RefCountedMemory() = default;
RefCountedStaticMemory::RefCountedStaticMemory() = default;
RefCountedStaticMemory::~RefCountedStaticMemory() = default;
RefCountedStaticMemory::RefCountedStaticMemory(base::span<const uint8_t> bytes)
: … { … }
base::span<const uint8_t> RefCountedStaticMemory::AsSpan() const { … }
RefCountedBytes::RefCountedBytes() = default;
RefCountedBytes::~RefCountedBytes() = default;
RefCountedBytes::RefCountedBytes(std::vector<uint8_t> initializer)
: … { … }
RefCountedBytes::RefCountedBytes(base::span<const uint8_t> initializer)
: … { … }
RefCountedBytes::RefCountedBytes(const uint8_t* p, size_t size)
: … { … }
RefCountedBytes::RefCountedBytes(size_t size) : … { … }
scoped_refptr<RefCountedBytes> RefCountedBytes::TakeVector(
std::vector<uint8_t>* to_destroy) { … }
base::span<const uint8_t> RefCountedBytes::AsSpan() const { … }
RefCountedString::RefCountedString() = default;
RefCountedString::~RefCountedString() = default;
RefCountedString::RefCountedString(std::string str) : … { … }
base::span<const uint8_t> RefCountedString::AsSpan() const { … }
RefCountedString16::RefCountedString16() = default;
RefCountedString16::~RefCountedString16() = default;
RefCountedString16::RefCountedString16(std::u16string str)
: … { … }
base::span<const uint8_t> RefCountedString16::AsSpan() const { … }
RefCountedSharedMemoryMapping::RefCountedSharedMemoryMapping(
ReadOnlySharedMemoryMapping mapping)
: … { … }
RefCountedSharedMemoryMapping::~RefCountedSharedMemoryMapping() = default;
base::span<const uint8_t> RefCountedSharedMemoryMapping::AsSpan() const { … }
scoped_refptr<RefCountedSharedMemoryMapping>
RefCountedSharedMemoryMapping::CreateFromWholeRegion(
const ReadOnlySharedMemoryRegion& region) { … }
}