// services/network/public/mojom/url_loader.mojom-test-utils.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2019 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_MOJOM_URL_LOADER_MOJOM_TEST_UTILS_H_
#define SERVICES_NETWORK_PUBLIC_MOJOM_URL_LOADER_MOJOM_TEST_UTILS_H_

#include "services/network/public/mojom/url_loader.mojom.h"


namespace network::mojom {


class  URLLoaderInterceptorForTesting : public URLLoader {
  virtual URLLoader* GetForwardingInterface() = 0;
  void FollowRedirect(::network::HttpRequestHeadersUpdateParams headers_update_params, const std::optional<::GURL>& new_url) override;
  void SetPriority(::net::RequestPriority priority, int32_t intra_priority_value) override;
};
class  URLLoaderAsyncWaiter {
 public:
  explicit URLLoaderAsyncWaiter(URLLoader* proxy);

  URLLoaderAsyncWaiter(const URLLoaderAsyncWaiter&) = delete;
  URLLoaderAsyncWaiter& operator=(const URLLoaderAsyncWaiter&) = delete;

  ~URLLoaderAsyncWaiter();

 private:
  URLLoader* const proxy_;
};


class  URLLoaderClientInterceptorForTesting : public URLLoaderClient {
  virtual URLLoaderClient* GetForwardingInterface() = 0;
  void OnReceiveEarlyHints(::network::mojom::EarlyHintsPtr early_hints) override;
  void OnReceiveResponse(::network::mojom::URLResponseHeadPtr head, ::mojo::ScopedDataPipeConsumerHandle body, std::optional<::mojo_base::BigBuffer> cached_metadata) override;
  void OnReceiveRedirect(const ::net::RedirectInfo& redirect_info, ::network::mojom::URLResponseHeadPtr head) override;
  void OnUploadProgress(int64_t current_position, int64_t total_size, OnUploadProgressCallback callback) override;
  void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
  void OnComplete(const ::network::URLLoaderCompletionStatus& status) override;
};
class  URLLoaderClientAsyncWaiter {
 public:
  explicit URLLoaderClientAsyncWaiter(URLLoaderClient* proxy);

  URLLoaderClientAsyncWaiter(const URLLoaderClientAsyncWaiter&) = delete;
  URLLoaderClientAsyncWaiter& operator=(const URLLoaderClientAsyncWaiter&) = delete;

  ~URLLoaderClientAsyncWaiter();
  void OnUploadProgress(
      int64_t current_position, int64_t total_size);
  

 private:
  URLLoaderClient* const proxy_;
};




}  // network::mojom

#endif  // SERVICES_NETWORK_PUBLIC_MOJOM_URL_LOADER_MOJOM_TEST_UTILS_H_