#include "third_party/blink/renderer/platform/loader/fetch/cached_metadata.h"
#include <utility>
#include "base/memory/scoped_refptr.h"
#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/platform/loader/fetch/url_loader/cached_metadata_handler.h"
namespace blink {
namespace {
template <typename DataType>
bool CheckSizeAndMarker(const DataType& data) { … }
Vector<uint8_t> GetSerializedData(uint32_t data_type_id,
const uint8_t* data,
wtf_size_t size,
uint64_t tag) { … }
}
scoped_refptr<CachedMetadata> CachedMetadata::Create(uint32_t data_type_id,
const uint8_t* data,
size_t size,
uint64_t tag) { … }
scoped_refptr<CachedMetadata> CachedMetadata::CreateFromSerializedData(
const uint8_t* data,
size_t size) { … }
scoped_refptr<CachedMetadata> CachedMetadata::CreateFromSerializedData(
Vector<uint8_t> data) { … }
scoped_refptr<CachedMetadata> CachedMetadata::CreateFromSerializedData(
mojo_base::BigBuffer& data) { … }
CachedMetadata::CachedMetadata(Vector<uint8_t> data,
base::PassKey<CachedMetadata>)
: … { … }
CachedMetadata::CachedMetadata(uint32_t data_type_id,
const uint8_t* data,
wtf_size_t size,
uint64_t tag,
base::PassKey<CachedMetadata>)
: … { … }
CachedMetadata::CachedMetadata(mojo_base::BigBuffer data,
base::PassKey<CachedMetadata>)
: … { … }
const uint8_t* CachedMetadata::RawData() const { … }
uint32_t CachedMetadata::RawSize() const { … }
absl::variant<Vector<uint8_t>, mojo_base::BigBuffer>
CachedMetadata::DrainSerializedData() && { … }
}