#include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/task/sequenced_task_runner.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
namespace network {
class CrossThreadPendingSharedURLLoaderFactory::State
: public base::RefCountedThreadSafe<State, StateDeleterTraits> { … };
struct CrossThreadPendingSharedURLLoaderFactory::StateDeleterTraits { … };
class CrossThreadSharedURLLoaderFactory : public SharedURLLoaderFactory { … };
CrossThreadSharedURLLoaderFactory::CrossThreadSharedURLLoaderFactory(
scoped_refptr<CrossThreadPendingSharedURLLoaderFactory::State> state)
: … { … }
CrossThreadSharedURLLoaderFactory::~CrossThreadSharedURLLoaderFactory() { … }
void CrossThreadSharedURLLoaderFactory::CreateLoaderAndStart(
mojo::PendingReceiver<mojom::URLLoader> loader,
int32_t request_id,
uint32_t options,
const ResourceRequest& request,
mojo::PendingRemote<mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { … }
void CrossThreadSharedURLLoaderFactory::Clone(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver) { … }
std::unique_ptr<PendingSharedURLLoaderFactory>
CrossThreadSharedURLLoaderFactory::Clone() { … }
CrossThreadPendingSharedURLLoaderFactory::
CrossThreadPendingSharedURLLoaderFactory(
scoped_refptr<SharedURLLoaderFactory> url_loader_factory)
: … { … }
CrossThreadPendingSharedURLLoaderFactory::
~CrossThreadPendingSharedURLLoaderFactory() = default;
scoped_refptr<SharedURLLoaderFactory>
CrossThreadPendingSharedURLLoaderFactory::CreateFactory() { … }
CrossThreadPendingSharedURLLoaderFactory::
CrossThreadPendingSharedURLLoaderFactory(scoped_refptr<State> state)
: … { … }
CrossThreadPendingSharedURLLoaderFactory::State::State(
scoped_refptr<SharedURLLoaderFactory> base_factory)
: … { … }
CrossThreadPendingSharedURLLoaderFactory::State::~State() { … }
void CrossThreadPendingSharedURLLoaderFactory::State::DeleteOnCorrectThread()
const { … }
void CrossThreadPendingSharedURLLoaderFactory::State::CreateLoaderAndStart(
mojo::PendingReceiver<mojom::URLLoader> loader,
int32_t request_id,
uint32_t options,
const ResourceRequest& request,
mojo::PendingRemote<mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) { … }
void CrossThreadPendingSharedURLLoaderFactory::State::Clone(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver) { … }
}