#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "content/common/service_worker/race_network_request_read_buffer_manager.h"
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/field_trial_params.h"
#include "content/common/features.h"
#include "mojo/public/c/system/types.h"
#include "net/base/io_buffer.h"
#include "services/network/public/cpp/features.h"
namespace content {
RaceNetworkRequestReadBufferManager::RaceNetworkRequestReadBufferManager(
mojo::ScopedDataPipeConsumerHandle consumer_handle)
: … { … }
RaceNetworkRequestReadBufferManager::~RaceNetworkRequestReadBufferManager() =
default;
void RaceNetworkRequestReadBufferManager::Watch(
mojo::SimpleWatcher::ReadyCallbackWithState callback) { … }
void RaceNetworkRequestReadBufferManager::ArmOrNotify() { … }
void RaceNetworkRequestReadBufferManager::CancelWatching() { … }
std::pair<MojoResult, base::span<const char>>
RaceNetworkRequestReadBufferManager::ReadData() { … }
void RaceNetworkRequestReadBufferManager::ConsumeData(size_t num_bytes_read) { … }
size_t RaceNetworkRequestReadBufferManager::BytesRemaining() const { … }
base::span<const char> RaceNetworkRequestReadBufferManager::RemainingBuffer()
const { … }
}