chromium/components/speech/upstream_loader.h

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

#ifndef COMPONENTS_SPEECH_UPSTREAM_LOADER_H_
#define COMPONENTS_SPEECH_UPSTREAM_LOADER_H_

#include <memory>
#include <string>

#include "base/memory/raw_ptr.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/system/data_pipe.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h"

namespace speech {

class UpstreamLoaderClient;

// Maximum amount of data written per Mojo write.
const size_t kMaxUploadWrite =;

// Streams sound data up to the server. Buffers entire request body into memory,
// so it can be replayed in the case of redirects or retries.
class UpstreamLoader : public network::mojom::ChunkedDataPipeGetter {};

}  // namespace speech

#endif  // COMPONENTS_SPEECH_UPSTREAM_LOADER_H_