#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/websockets/websocket_message_chunk_accumulator.h"
#include <string.h>
#include <algorithm>
#include "base/ranges/algorithm.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/tick_clock.h"
namespace blink {
constexpr size_t WebSocketMessageChunkAccumulator::kSegmentSize;
constexpr base::TimeDelta WebSocketMessageChunkAccumulator::kFreeDelay;
WebSocketMessageChunkAccumulator::WebSocketMessageChunkAccumulator(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: … { … }
WebSocketMessageChunkAccumulator::~WebSocketMessageChunkAccumulator() = default;
void WebSocketMessageChunkAccumulator::SetTaskRunnerForTesting(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::TickClock* tick_clock) { … }
void WebSocketMessageChunkAccumulator::Append(base::span<const char> data) { … }
Vector<base::span<const char>> WebSocketMessageChunkAccumulator::GetView()
const { … }
void WebSocketMessageChunkAccumulator::Clear() { … }
void WebSocketMessageChunkAccumulator::Reset() { … }
void WebSocketMessageChunkAccumulator::OnTimerFired(TimerBase*) { … }
void WebSocketMessageChunkAccumulator::Trace(Visitor* visitor) const { … }
}