chromium/storage/browser/blob/blob_url_loader_factory.cc

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

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

// The mojo::Remote<BlobURLToken> parameter is passed in to make sure the
// connection stays alive until this method is called, it is not otherwise used
// by this method.
void CreateFactoryForToken(
    mojo::Remote<blink::mojom::BlobURLToken>,
    base::WeakPtr<BlobUrlRegistry> url_registry,
    mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
    const base::UnguessableToken& token) {}

}  // namespace

// static
void BlobURLLoaderFactory::Create(
    mojo::PendingRemote<blink::mojom::Blob> pending_blob,
    const GURL& blob_url,
    mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) {}

// static
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() {}

}  // namespace storage