| Index: net/http/bidirectional_stream.cc
|
| diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
|
| index 5c04ca3c2e5b5dff861a5e16a80ebfc05707b695..fbea8510276b1d5bfdb9a4ac56daca72bec8643c 100644
|
| --- a/net/http/bidirectional_stream.cc
|
| +++ b/net/http/bidirectional_stream.cc
|
| @@ -26,26 +26,32 @@ namespace net {
|
|
|
| BidirectionalStream::Delegate::Delegate() {}
|
|
|
| +void BidirectionalStream::Delegate::OnStreamReady() {}
|
| +
|
| BidirectionalStream::Delegate::~Delegate() {}
|
|
|
| BidirectionalStream::BidirectionalStream(
|
| scoped_ptr<BidirectionalStreamRequestInfo> request_info,
|
| HttpNetworkSession* session,
|
| + bool disable_auto_flush,
|
| Delegate* delegate)
|
| : BidirectionalStream(std::move(request_info),
|
| session,
|
| + disable_auto_flush,
|
| delegate,
|
| make_scoped_ptr(new base::Timer(false, false))) {}
|
|
|
| BidirectionalStream::BidirectionalStream(
|
| scoped_ptr<BidirectionalStreamRequestInfo> request_info,
|
| HttpNetworkSession* session,
|
| + bool disable_auto_flush,
|
| Delegate* delegate,
|
| scoped_ptr<base::Timer> timer)
|
| : request_info_(std::move(request_info)),
|
| net_log_(BoundNetLog::Make(session->net_log(),
|
| NetLog::SOURCE_BIDIRECTIONAL_STREAM)),
|
| session_(session),
|
| + disable_auto_flush_(disable_auto_flush),
|
| delegate_(delegate),
|
| timer_(std::move(timer)) {
|
| DCHECK(delegate_);
|
| @@ -97,6 +103,14 @@ void BidirectionalStream::SendData(IOBuffer* data,
|
| stream_impl_->SendData(data, length, end_stream);
|
| }
|
|
|
| +void BidirectionalStream::SendvData(const std::vector<IOBuffer*>& buffers,
|
| + const std::vector<int>& lengths,
|
| + bool end_stream) {
|
| + DCHECK(stream_impl_);
|
| +
|
| + stream_impl_->SendvData(buffers, lengths, end_stream);
|
| +}
|
| +
|
| void BidirectionalStream::Cancel() {
|
| stream_request_.reset();
|
| if (stream_impl_) {
|
| @@ -126,8 +140,8 @@ int64_t BidirectionalStream::GetTotalSentBytes() const {
|
| return stream_impl_->GetTotalSentBytes();
|
| }
|
|
|
| -void BidirectionalStream::OnHeadersSent() {
|
| - delegate_->OnHeadersSent();
|
| +void BidirectionalStream::OnStreamReady() {
|
| + delegate_->OnStreamReady();
|
| }
|
|
|
| void BidirectionalStream::OnHeadersReceived(
|
| @@ -175,7 +189,8 @@ void BidirectionalStream::OnBidirectionalStreamImplReady(
|
|
|
| stream_request_.reset();
|
| stream_impl_.reset(stream);
|
| - stream_impl_->Start(request_info_.get(), net_log_, this, std::move(timer_));
|
| + stream_impl_->Start(request_info_.get(), net_log_, disable_auto_flush_, this,
|
| + std::move(timer_));
|
| }
|
|
|
| void BidirectionalStream::OnWebSocketHandshakeStreamReady(
|
|
|