#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/spdy/spdy_buffer.h"
#include <cstring>
#include <utility>
#include "base/check_op.h"
#include "base/functional/callback.h"
#include "base/trace_event/memory_usage_estimator.h"
#include "net/base/io_buffer.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
namespace net {
namespace {
const size_t kMaxSpdyFrameSize = …;
std::unique_ptr<spdy::SpdySerializedFrame> MakeSpdySerializedFrame(
const char* data,
size_t size) { … }
}
class SpdyBuffer::SharedFrameIOBuffer : public IOBuffer { … };
SpdyBuffer::SpdyBuffer(std::unique_ptr<spdy::SpdySerializedFrame> frame)
: … { … }
SpdyBuffer::SpdyBuffer(const char* data, size_t size)
: … { … }
SpdyBuffer::~SpdyBuffer() { … }
const char* SpdyBuffer::GetRemainingData() const { … }
size_t SpdyBuffer::GetRemainingSize() const { … }
void SpdyBuffer::AddConsumeCallback(const ConsumeCallback& consume_callback) { … }
void SpdyBuffer::Consume(size_t consume_size) { … }
scoped_refptr<IOBuffer> SpdyBuffer::GetIOBufferForRemainingData() { … }
void SpdyBuffer::ConsumeHelper(size_t consume_size,
ConsumeSource consume_source) { … }
}