| 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/quic/reliable_quic_stream.h" | 5 #include "net/quic/reliable_quic_stream.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/iovector.h" | 8 #include "net/quic/iovector.h" |
| 9 #include "net/quic/quic_flow_controller.h" | 9 #include "net/quic/quic_flow_controller.h" |
| 10 #include "net/quic/quic_session.h" | 10 #include "net/quic/quic_session.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 stream_error_ = QUIC_STREAM_CONNECTION_ERROR; | 227 stream_error_ = QUIC_STREAM_CONNECTION_ERROR; |
| 228 connection_error_ = error; | 228 connection_error_ = error; |
| 229 } | 229 } |
| 230 | 230 |
| 231 CloseWriteSide(); | 231 CloseWriteSide(); |
| 232 CloseReadSide(); | 232 CloseReadSide(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void ReliableQuicStream::OnFinRead() { | 235 void ReliableQuicStream::OnFinRead() { |
| 236 DCHECK(sequencer_.IsClosed()); | 236 DCHECK(sequencer_.IsClosed()); |
| 237 fin_received_ = true; |
| 237 CloseReadSide(); | 238 CloseReadSide(); |
| 238 } | 239 } |
| 239 | 240 |
| 240 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) { | 241 void ReliableQuicStream::Reset(QuicRstStreamErrorCode error) { |
| 241 DCHECK_NE(QUIC_STREAM_NO_ERROR, error); | 242 DCHECK_NE(QUIC_STREAM_NO_ERROR, error); |
| 242 stream_error_ = error; | 243 stream_error_ = error; |
| 243 // Sending a RstStream results in calling CloseStream. | 244 // Sending a RstStream results in calling CloseStream. |
| 244 session()->SendRstStream(id(), error, stream_bytes_written_); | 245 session()->SendRstStream(id(), error, stream_bytes_written_); |
| 245 rst_sent_ = true; | 246 rst_sent_ = true; |
| 246 } | 247 } |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 535 |
| 535 bool ReliableQuicStream::IsFlowControlBlocked() { | 536 bool ReliableQuicStream::IsFlowControlBlocked() { |
| 536 if (flow_controller_.IsBlocked()) { | 537 if (flow_controller_.IsBlocked()) { |
| 537 return true; | 538 return true; |
| 538 } | 539 } |
| 539 return stream_contributes_to_connection_flow_control_ && | 540 return stream_contributes_to_connection_flow_control_ && |
| 540 connection_flow_controller_->IsBlocked(); | 541 connection_flow_controller_->IsBlocked(); |
| 541 } | 542 } |
| 542 | 543 |
| 543 } // namespace net | 544 } // namespace net |
| OLD | NEW |