#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/loader/fetch/script_cached_metadata_handler.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/blink/renderer/platform/crypto.h"
#include "third_party/blink/renderer/platform/loader/fetch/cached_metadata.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
namespace blink {
ScriptCachedMetadataHandler::ScriptCachedMetadataHandler(
const WTF::TextEncoding& encoding,
std::unique_ptr<CachedMetadataSender> sender)
: … { … }
ScriptCachedMetadataHandler::~ScriptCachedMetadataHandler() = default;
void ScriptCachedMetadataHandler::Trace(Visitor* visitor) const { … }
void ScriptCachedMetadataHandler::SetCachedMetadata(
CodeCacheHost* code_cache_host,
uint32_t data_type_id,
const uint8_t* data,
size_t size) { … }
void ScriptCachedMetadataHandler::ClearCachedMetadata(
CodeCacheHost* code_cache_host,
ClearCacheType cache_type) { … }
scoped_refptr<CachedMetadata> ScriptCachedMetadataHandler::GetCachedMetadata(
uint32_t data_type_id,
GetCachedMetadataBehavior behavior) const { … }
void ScriptCachedMetadataHandler::SetSerializedCachedMetadata(
mojo_base::BigBuffer data) { … }
String ScriptCachedMetadataHandler::Encoding() const { … }
bool ScriptCachedMetadataHandler::IsServedFromCacheStorage() const { … }
void ScriptCachedMetadataHandler::OnMemoryDump(
WebProcessMemoryDump* pmd,
const String& dump_prefix) const { … }
size_t ScriptCachedMetadataHandler::GetCodeCacheSize() const { … }
void ScriptCachedMetadataHandler::CommitToPersistentStorage(
CodeCacheHost* code_cache_host) { … }
void ScriptCachedMetadataHandlerWithHashing::Check(
CodeCacheHost* code_cache_host,
const ParkableString& source_text) { … }
void ScriptCachedMetadataHandlerWithHashing::SetSerializedCachedMetadata(
mojo_base::BigBuffer data) { … }
scoped_refptr<CachedMetadata>
ScriptCachedMetadataHandlerWithHashing::GetCachedMetadata(
uint32_t data_type_id,
GetCachedMetadataBehavior behavior) const { … }
void ScriptCachedMetadataHandlerWithHashing::CommitToPersistentStorage(
CodeCacheHost* code_cache_host) { … }
Vector<uint8_t>
ScriptCachedMetadataHandlerWithHashing::GetSerializedCachedMetadata() const { … }
void ScriptCachedMetadataHandlerWithHashing::ResetForTesting() { … }
}