chromium/services/network/public/cpp/empty_url_loader_client.h

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

#ifndef SERVICES_NETWORK_PUBLIC_CPP_EMPTY_URL_LOADER_CLIENT_H_
#define SERVICES_NETWORK_PUBLIC_CPP_EMPTY_URL_LOADER_CLIENT_H_

#include <memory>

#include "base/functional/callback_forward.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 "mojo/public/cpp/system/data_pipe_drainer.h"
#include "services/network/public/cpp/url_loader_completion_status.h"
#include "services/network/public/mojom/url_loader.mojom.h"

namespace network {

// Helper for draining/discarding data and callbacks that go to URLLoaderClient.
class COMPONENT_EXPORT(NETWORK_CPP) EmptyURLLoaderClient
    : public mojom::URLLoaderClient,
      public mojo::DataPipeDrainer::Client {};

// Self-owned helper class for using EmptyURLLoaderClient.
class COMPONENT_EXPORT(NETWORK_CPP) EmptyURLLoaderClientWrapper {};

}  // namespace network

#endif  // SERVICES_NETWORK_PUBLIC_CPP_EMPTY_URL_LOADER_CLIENT_H_