#include "third_party/blink/renderer/core/inspector/network_resources_data.h"
#include <memory>
#include "base/numerics/safe_conversions.h"
#include "third_party/blink/renderer/core/dom/dom_implementation.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_response.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/shared_buffer.h"
namespace blink {
namespace {
bool IsPossiblyTextResourceType(InspectorPageAgent::ResourceType type) { … }
bool IsHTTPErrorStatusCode(int status_code) { … }
}
void XHRReplayData::AddHeader(const AtomicString& key,
const AtomicString& value) { … }
XHRReplayData::XHRReplayData(ExecutionContext* execution_context,
const AtomicString& method,
const KURL& url,
bool async,
bool include_credentials)
: … { … }
NetworkResourcesData::ResourceData::ResourceData(
NetworkResourcesData* network_resources_data,
const String& request_id,
const String& loader_id,
const KURL& requested_url)
: … { … }
void NetworkResourcesData::ResourceData::Trace(Visitor* visitor) const { … }
void NetworkResourcesData::ResourceData::SetContent(const String& content,
bool base64_encoded) { … }
size_t NetworkResourcesData::ResourceData::ContentSize() const { … }
size_t NetworkResourcesData::ResourceData::RemoveResponseContent() { … }
size_t NetworkResourcesData::ResourceData::EvictContent() { … }
void NetworkResourcesData::ResourceData::SetResource(
const Resource* cached_resource) { … }
void NetworkResourcesData::ResourceData::ProcessCustomWeakness(
const LivenessBroker& info) { … }
void NetworkResourcesData::ResourceData::FontResourceDataWillBeCleared() { … }
void NetworkResourcesData::ResourceData::AppendData(const char* data,
size_t data_length) { … }
size_t NetworkResourcesData::ResourceData::DecodeDataToContent() { … }
NetworkResourcesData::NetworkResourcesData(size_t total_buffer_size,
size_t resource_buffer_size)
: … { … }
NetworkResourcesData::~NetworkResourcesData() = default;
void NetworkResourcesData::Trace(Visitor* visitor) const { … }
void NetworkResourcesData::ResourceCreated(
const String& request_id,
const String& loader_id,
const KURL& requested_url,
scoped_refptr<EncodedFormData> post_data) { … }
void NetworkResourcesData::ResponseReceived(const String& request_id,
const String& frame_id,
const ResourceResponse& response) { … }
void NetworkResourcesData::BlobReceived(const String& request_id,
scoped_refptr<BlobDataHandle> blob) { … }
void NetworkResourcesData::SetResourceType(
const String& request_id,
InspectorPageAgent::ResourceType type) { … }
InspectorPageAgent::ResourceType NetworkResourcesData::GetResourceType(
const String& request_id) { … }
void NetworkResourcesData::SetResourceContent(const String& request_id,
const String& content,
bool base64_encoded) { … }
NetworkResourcesData::ResourceData*
NetworkResourcesData::PrepareToAddResourceData(const String& request_id,
uint64_t data_length) { … }
void NetworkResourcesData::MaybeAddResourceData(const String& request_id,
const char* data,
uint64_t data_length) { … }
void NetworkResourcesData::MaybeAddResourceData(
const String& request_id,
scoped_refptr<const SharedBuffer> data) { … }
void NetworkResourcesData::MaybeDecodeDataToContent(const String& request_id) { … }
void NetworkResourcesData::AddResource(const String& request_id,
const Resource* cached_resource) { … }
NetworkResourcesData::ResourceData const* NetworkResourcesData::Data(
const String& request_id) { … }
XHRReplayData* NetworkResourcesData::XhrReplayData(const String& request_id) { … }
void NetworkResourcesData::SetCertificate(
const String& request_id,
scoped_refptr<net::X509Certificate> certificate) { … }
void NetworkResourcesData::SetXHRReplayData(const String& request_id,
XHRReplayData* xhr_replay_data) { … }
HeapVector<Member<NetworkResourcesData::ResourceData>>
NetworkResourcesData::Resources() { … }
int64_t NetworkResourcesData::GetAndClearPendingEncodedDataLength(
const String& request_id) { … }
void NetworkResourcesData::AddPendingEncodedDataLength(
const String& request_id,
size_t encoded_data_length) { … }
void NetworkResourcesData::Clear(const String& preserved_loader_id) { … }
void NetworkResourcesData::SetResourcesDataSizeLimits(
size_t resources_content_size,
size_t single_resource_content_size) { … }
NetworkResourcesData::ResourceData*
NetworkResourcesData::ResourceDataForRequestId(const String& request_id) const { … }
void NetworkResourcesData::EnsureNoDataForRequestId(const String& request_id) { … }
bool NetworkResourcesData::EnsureFreeSpace(uint64_t size) { … }
}