#include "storage/browser/blob/blob_url_loader_factory.h"
#include "base/functional/bind.h"
#include "mojo/public/cpp/bindings/callback_helpers.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "storage/browser/blob/blob_url_registry.h"
namespace storage {
namespace {
void CreateFactoryForToken(
mojo::Remote<blink::mojom::BlobURLToken>,
base::WeakPtr<BlobUrlRegistry> url_registry,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
const base::UnguessableToken& token) { … }
}
void BlobURLLoaderFactory::Create(
mojo::PendingRemote<blink::mojom::Blob> pending_blob,
const GURL& blob_url,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) { … }
void BlobURLLoaderFactory::Create(
mojo::PendingRemote<blink::mojom::BlobURLToken> token,
base::WeakPtr<BlobUrlRegistry> url_registry,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) { … }
void BlobURLLoaderFactory::CreateLoaderAndStart(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t request_id,
uint32_t options,
const network::ResourceRequest& request,
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { … }
void BlobURLLoaderFactory::Clone(
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) { … }
BlobURLLoaderFactory::BlobURLLoaderFactory(
mojo::PendingRemote<blink::mojom::Blob> blob,
const GURL& blob_url,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
: … { … }
BlobURLLoaderFactory::~BlobURLLoaderFactory() = default;
void BlobURLLoaderFactory::OnConnectionError() { … }
}