#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/spdy/bidirectional_stream_spdy_impl.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "net/http/bidirectional_stream_request_info.h"
#include "net/spdy/spdy_buffer.h"
#include "net/spdy/spdy_http_utils.h"
#include "net/spdy/spdy_stream.h"
namespace net {
namespace {
const int kBufferTimeMs = …;
}
BidirectionalStreamSpdyImpl::BidirectionalStreamSpdyImpl(
const base::WeakPtr<SpdySession>& spdy_session,
NetLogSource source_dependency)
: … { … }
BidirectionalStreamSpdyImpl::~BidirectionalStreamSpdyImpl() { … }
void BidirectionalStreamSpdyImpl::Start(
const BidirectionalStreamRequestInfo* request_info,
const NetLogWithSource& net_log,
bool ,
BidirectionalStreamImpl::Delegate* delegate,
std::unique_ptr<base::OneShotTimer> timer,
const NetworkTrafficAnnotationTag& traffic_annotation) { … }
void BidirectionalStreamSpdyImpl::SendRequestHeaders() { … }
int BidirectionalStreamSpdyImpl::ReadData(IOBuffer* buf, int buf_len) { … }
void BidirectionalStreamSpdyImpl::SendvData(
const std::vector<scoped_refptr<IOBuffer>>& buffers,
const std::vector<int>& lengths,
bool end_stream) { … }
NextProto BidirectionalStreamSpdyImpl::GetProtocol() const { … }
int64_t BidirectionalStreamSpdyImpl::GetTotalReceivedBytes() const { … }
int64_t BidirectionalStreamSpdyImpl::GetTotalSentBytes() const { … }
bool BidirectionalStreamSpdyImpl::GetLoadTimingInfo(
LoadTimingInfo* load_timing_info) const { … }
void BidirectionalStreamSpdyImpl::PopulateNetErrorDetails(
NetErrorDetails* details) { … }
void BidirectionalStreamSpdyImpl::OnHeadersSent() { … }
void BidirectionalStreamSpdyImpl::OnEarlyHintsReceived(
const quiche::HttpHeaderBlock& headers) { … }
void BidirectionalStreamSpdyImpl::OnHeadersReceived(
const quiche::HttpHeaderBlock& response_headers) { … }
void BidirectionalStreamSpdyImpl::OnDataReceived(
std::unique_ptr<SpdyBuffer> buffer) { … }
void BidirectionalStreamSpdyImpl::OnDataSent() { … }
void BidirectionalStreamSpdyImpl::OnTrailers(
const quiche::HttpHeaderBlock& trailers) { … }
void BidirectionalStreamSpdyImpl::OnClose(int status) { … }
bool BidirectionalStreamSpdyImpl::CanGreaseFrameType() const { … }
NetLogSource BidirectionalStreamSpdyImpl::source_dependency() const { … }
int BidirectionalStreamSpdyImpl::SendRequestHeadersHelper() { … }
void BidirectionalStreamSpdyImpl::OnStreamInitialized(int rv) { … }
void BidirectionalStreamSpdyImpl::NotifyError(int rv) { … }
void BidirectionalStreamSpdyImpl::ResetStream() { … }
void BidirectionalStreamSpdyImpl::ScheduleBufferedRead() { … }
void BidirectionalStreamSpdyImpl::DoBufferedRead() { … }
bool BidirectionalStreamSpdyImpl::ShouldWaitForMoreBufferedData() const { … }
bool BidirectionalStreamSpdyImpl::MaybeHandleStreamClosedInSendData() { … }
}