| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // TODO(ahendrickson): This is recorded after the entire SYN_STREAM control | 404 // TODO(ahendrickson): This is recorded after the entire SYN_STREAM control |
| 405 // frame has been received and processed. Move to framer? | 405 // frame has been received and processed. Move to framer? |
| 406 response_info_->response_time = response_time; | 406 response_info_->response_time = response_time; |
| 407 | 407 |
| 408 if (!callback_.is_null()) | 408 if (!callback_.is_null()) |
| 409 DoCallback(status); | 409 DoCallback(status); |
| 410 | 410 |
| 411 return status; | 411 return status; |
| 412 } | 412 } |
| 413 | 413 |
| 414 void SpdyHttpStream::OnHeadersSent() { |
| 415 // For HTTP streams, no HEADERS frame is sent from the client. |
| 416 NOTREACHED(); |
| 417 } |
| 418 |
| 414 void SpdyHttpStream::OnDataReceived(const char* data, int length) { | 419 void SpdyHttpStream::OnDataReceived(const char* data, int length) { |
| 415 // SpdyStream won't call us with data if the header block didn't contain a | 420 // SpdyStream won't call us with data if the header block didn't contain a |
| 416 // valid set of headers. So we don't expect to not have headers received | 421 // valid set of headers. So we don't expect to not have headers received |
| 417 // here. | 422 // here. |
| 418 DCHECK(response_headers_received_); | 423 DCHECK(response_headers_received_); |
| 419 | 424 |
| 420 // Note that data may be received for a SpdyStream prior to the user calling | 425 // Note that data may be received for a SpdyStream prior to the user calling |
| 421 // ReadResponseBody(), therefore user_buffer_ may be NULL. This may often | 426 // ReadResponseBody(), therefore user_buffer_ may be NULL. This may often |
| 422 // happen for server initiated streams. | 427 // happen for server initiated streams. |
| 423 DCHECK(!stream_->closed() || stream_->pushed()); | 428 DCHECK(!stream_->closed() || stream_->pushed()); |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 bool SpdyHttpStream::IsSpdyHttpStream() const { | 555 bool SpdyHttpStream::IsSpdyHttpStream() const { |
| 551 return true; | 556 return true; |
| 552 } | 557 } |
| 553 | 558 |
| 554 void SpdyHttpStream::Drain(HttpNetworkSession* session) { | 559 void SpdyHttpStream::Drain(HttpNetworkSession* session) { |
| 555 Close(false); | 560 Close(false); |
| 556 delete this; | 561 delete this; |
| 557 } | 562 } |
| 558 | 563 |
| 559 } // namespace net | 564 } // namespace net |
| OLD | NEW |