chromium/services/network/public/cpp/url_loader_factory_builder.cc

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

#include "services/network/public/cpp/url_loader_factory_builder.h"

namespace network {

URLLoaderFactoryBuilder::URLLoaderFactoryBuilder() = default;
URLLoaderFactoryBuilder::~URLLoaderFactoryBuilder() = default;
URLLoaderFactoryBuilder::URLLoaderFactoryBuilder(URLLoaderFactoryBuilder&&) =
    default;
URLLoaderFactoryBuilder& URLLoaderFactoryBuilder::operator=(
    URLLoaderFactoryBuilder&&) = default;

std::tuple<mojo::PendingReceiver<mojom::URLLoaderFactory>,
           mojo::PendingRemote<mojom::URLLoaderFactory>>
URLLoaderFactoryBuilder::Append() {}

bool URLLoaderFactoryBuilder::IsEmpty() const {}

// We use `Clone()` instead of `mojo::FusePipes()` in the following two methods
// because theoretically the `URLLoaderFactoryBuilder` interface can't ensure
// that `terminal_factory` is fuseable.
//
// TODO(crbug.com/40947547): Consider removing the `Clone()` calls for
// performance. Probably the `terminal_factory` is actually fusable for the
// actual `URLLoaderFactoryBuilder` callers reaching here (e.g.
// `non_network_factories` in `RenderFrameHostImpl::CommitNavigation()` and
// `NavigationURLLoaderImpl::non_network_url_loader_factories_`). Probably we
// should refactor the `non_network_factories` patterns altogether.
void URLLoaderFactoryBuilder::ConnectTerminal(
    mojo::PendingReceiver<mojom::URLLoaderFactory> pending_receiver,
    mojo::Remote<mojom::URLLoaderFactory> terminal_factory) {}

void URLLoaderFactoryBuilder::ConnectTerminal(
    mojo::PendingReceiver<mojom::URLLoaderFactory> pending_receiver,
    mojo::PendingRemote<mojom::URLLoaderFactory> terminal_factory) {}

void URLLoaderFactoryBuilder::ConnectTerminal(
    mojo::PendingReceiver<mojom::URLLoaderFactory> pending_receiver,
    scoped_refptr<SharedURLLoaderFactory> terminal_factory) {}

void URLLoaderFactoryBuilder::ConnectTerminal(
    mojo::PendingReceiver<network::mojom::URLLoaderFactory> pending_receiver,
    network::mojom::NetworkContext* terminal_context,
    network::mojom::URLLoaderFactoryParamsPtr factory_param) {}

template <>
scoped_refptr<SharedURLLoaderFactory> URLLoaderFactoryBuilder::WrapAs(
    mojo::PendingRemote<mojom::URLLoaderFactory> in) {}

template <>
mojo::PendingRemote<mojom::URLLoaderFactory> URLLoaderFactoryBuilder::WrapAs(
    scoped_refptr<SharedURLLoaderFactory> in) {}

PendingSharedURLLoaderFactoryWithBuilder::
    PendingSharedURLLoaderFactoryWithBuilder(
        URLLoaderFactoryBuilder factory_builder,
        std::unique_ptr<PendingSharedURLLoaderFactory> terminal_pending_factory)
    :{}
PendingSharedURLLoaderFactoryWithBuilder::
    ~PendingSharedURLLoaderFactoryWithBuilder() = default;

scoped_refptr<SharedURLLoaderFactory>
PendingSharedURLLoaderFactoryWithBuilder::CreateFactory() {}

}  // namespace network