chromium/third_party/blink/renderer/core/inspector/network_resources_data.cc

/*
 * Copyright (C) 2011 Google Inc. 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 GOOGLE INC. AND ITS CONTRIBUTORS
 * "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 GOOGLE INC.
 * OR ITS 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.
 */

#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) {}

}  // namespace

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)
    :{}

// ResourceData
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::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) {}

}  // namespace blink