chromium/content/browser/devtools/protocol/devtools_network_resource_loader.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/devtools/protocol/devtools_network_resource_loader.h"

#include <cstddef>
#include <string_view>

#include "base/functional/bind.h"
#include "base/json/json_writer.h"
#include "base/memory/ptr_util.h"
#include "net/base/load_flags.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/mojom/url_response_head.mojom.h"

namespace content {
namespace protocol {

DevToolsNetworkResourceLoader::DevToolsNetworkResourceLoader(
    network::ResourceRequest resource_request,
    const net::NetworkTrafficAnnotationTag& traffic_annotation,
    mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory,
    CompletionCallback completion_callback)
    :{}

DevToolsNetworkResourceLoader::~DevToolsNetworkResourceLoader() = default;

// We can trust the |origin| parameter here, as it is the last committed origin
// of a RenderFrameHost identified by a DevTools frame token. Note that there
// is a potential race condition when DevTools sends a request while the frame
// already navigates away. This is difficult to fix before the
// RenderDocumentHost refactoring is done.
// static
std::unique_ptr<DevToolsNetworkResourceLoader>
DevToolsNetworkResourceLoader::Create(
    mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory,
    GURL gurl,
    const url::Origin& origin,
    net::SiteForCookies site_for_cookies,
    Caching caching,
    Credentials include_credentials,
    CompletionCallback completion_callback) {}

void DevToolsNetworkResourceLoader::OnRetry(base::OnceClosure start_retry) {}

void DevToolsNetworkResourceLoader::DownloadAsStream() {}

void DevToolsNetworkResourceLoader::OnDataReceived(std::string_view chunk,
                                                   base::OnceClosure resume) {}

void DevToolsNetworkResourceLoader::OnComplete(bool success) {}

}  // namespace protocol
}  // namespace content