chromium/services/network/prefetch_url_loader_client.h

// 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.

#ifndef SERVICES_NETWORK_PREFETCH_URL_LOADER_CLIENT_H_
#define SERVICES_NETWORK_PREFETCH_URL_LOADER_CLIENT_H_

#include "base/containers/linked_list.h"
#include "base/functional/callback_forward.h"
#include "base/time/time.h"
#include "base/types/pass_key.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/network_isolation_key.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "url/gurl.h"

namespace network {

class PrefetchCache;

// An implementation of PrefetchURLLoaderClient that is used for prefetches. It
// can cache ongoing requests until they are requests by a render process, and
// then forward on the callbacks that were received.
class COMPONENT_EXPORT(NETWORK_SERVICE) PrefetchURLLoaderClient final
    : public mojom::URLLoaderClient,
      public base::LinkNode<PrefetchURLLoaderClient> {};

}  // namespace network

#endif  // SERVICES_NETWORK_PREFETCH_URL_LOADER_CLIENT_H_