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