#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/platform/loader/fetch/buffering_bytes_consumer.h"
#include "base/numerics/safe_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink {
namespace {
constexpr int32_t kDelayMilliseconds = …;
}
BufferingBytesConsumer* BufferingBytesConsumer::CreateWithDelay(
BytesConsumer* bytes_consumer,
scoped_refptr<base::SingleThreadTaskRunner> timer_task_runner) { … }
BufferingBytesConsumer* BufferingBytesConsumer::Create(
BytesConsumer* bytes_consumer) { … }
BufferingBytesConsumer::BufferingBytesConsumer(
base::PassKey<BufferingBytesConsumer> key,
BytesConsumer* bytes_consumer,
scoped_refptr<base::SingleThreadTaskRunner> timer_task_runner,
base::TimeDelta buffering_start_delay)
: … { … }
BufferingBytesConsumer::~BufferingBytesConsumer() = default;
void BufferingBytesConsumer::MaybeStartBuffering() { … }
void BufferingBytesConsumer::StopBuffering() { … }
BytesConsumer::Result BufferingBytesConsumer::BeginRead(const char** buffer,
size_t* available) { … }
BytesConsumer::Result BufferingBytesConsumer::EndRead(size_t read_size) { … }
scoped_refptr<BlobDataHandle> BufferingBytesConsumer::DrainAsBlobDataHandle(
BlobSizePolicy policy) { … }
scoped_refptr<EncodedFormData> BufferingBytesConsumer::DrainAsFormData() { … }
mojo::ScopedDataPipeConsumerHandle BufferingBytesConsumer::DrainAsDataPipe() { … }
void BufferingBytesConsumer::SetClient(BytesConsumer::Client* client) { … }
void BufferingBytesConsumer::ClearClient() { … }
void BufferingBytesConsumer::Cancel() { … }
BytesConsumer::PublicState BufferingBytesConsumer::GetPublicState() const { … }
BytesConsumer::Error BufferingBytesConsumer::GetError() const { … }
String BufferingBytesConsumer::DebugName() const { … }
void BufferingBytesConsumer::Trace(Visitor* visitor) const { … }
void BufferingBytesConsumer::OnTimerFired(TimerBase*) { … }
void BufferingBytesConsumer::OnStateChange() { … }
void BufferingBytesConsumer::BufferData() { … }
}