#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/filter/mock_source_stream.h"
#include <algorithm>
#include <utility>
#include "base/check_op.h"
#include "net/base/io_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
MockSourceStream::MockSourceStream() : … { … }
MockSourceStream::~MockSourceStream() { … }
int MockSourceStream::Read(IOBuffer* dest_buffer,
int buffer_size,
CompletionOnceCallback callback) { … }
std::string MockSourceStream::Description() const { … }
bool MockSourceStream::MayHaveMoreBytes() const { … }
MockSourceStream::QueuedResult::QueuedResult(const char* data,
int len,
Error error,
Mode mode)
: … { … }
void MockSourceStream::AddReadResult(const char* data,
int len,
Error error,
Mode mode) { … }
void MockSourceStream::CompleteNextRead() { … }
}