| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 CHECK(request_body_stream_.get()); | 257 CHECK(request_body_stream_.get()); |
| 258 int buf_len = static_cast<int>(request_body_stream_->buf_len()); | 258 int buf_len = static_cast<int>(request_body_stream_->buf_len()); |
| 259 if (!buf_len) | 259 if (!buf_len) |
| 260 return OK; | 260 return OK; |
| 261 return stream_->WriteStreamData(request_body_stream_->buf(), buf_len, | 261 return stream_->WriteStreamData(request_body_stream_->buf(), buf_len, |
| 262 spdy::DATA_FLAG_FIN); | 262 spdy::DATA_FLAG_FIN); |
| 263 } | 263 } |
| 264 | 264 |
| 265 bool SpdyHttpStream::OnSendBodyComplete(int status) { | 265 bool SpdyHttpStream::OnSendBodyComplete(int status) { |
| 266 CHECK(request_body_stream_.get()); | 266 CHECK(request_body_stream_.get()); |
| 267 request_body_stream_->DidConsume(status); | 267 request_body_stream_->MarkConsumedAndFillBuffer(status); |
| 268 return request_body_stream_->eof(); | 268 return request_body_stream_->eof(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 int SpdyHttpStream::OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 271 int SpdyHttpStream::OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
| 272 base::Time response_time, | 272 base::Time response_time, |
| 273 int status) { | 273 int status) { |
| 274 if (!response_info_) { | 274 if (!response_info_) { |
| 275 DCHECK(stream_->pushed()); | 275 DCHECK(stream_->pushed()); |
| 276 push_response_info_.reset(new HttpResponseInfo); | 276 push_response_info_.reset(new HttpResponseInfo); |
| 277 response_info_ = push_response_info_.get(); | 277 response_info_ = push_response_info_.get(); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 stream_->GetSSLInfo(ssl_info, &using_npn); | 427 stream_->GetSSLInfo(ssl_info, &using_npn); |
| 428 } | 428 } |
| 429 | 429 |
| 430 void SpdyHttpStream::GetSSLCertRequestInfo( | 430 void SpdyHttpStream::GetSSLCertRequestInfo( |
| 431 SSLCertRequestInfo* cert_request_info) { | 431 SSLCertRequestInfo* cert_request_info) { |
| 432 DCHECK(stream_); | 432 DCHECK(stream_); |
| 433 stream_->GetSSLCertRequestInfo(cert_request_info); | 433 stream_->GetSSLCertRequestInfo(cert_request_info); |
| 434 } | 434 } |
| 435 | 435 |
| 436 } // namespace net | 436 } // namespace net |
| OLD | NEW |