| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 fin_buffered_(false), | 122 fin_buffered_(false), |
| 123 fin_sent_(false), | 123 fin_sent_(false), |
| 124 rst_sent_(false), | 124 rst_sent_(false), |
| 125 is_server_(session_->is_server()), | 125 is_server_(session_->is_server()), |
| 126 flow_controller_( | 126 flow_controller_( |
| 127 id_, | 127 id_, |
| 128 is_server_, | 128 is_server_, |
| 129 session_->config()->peer_initial_flow_control_window_bytes(), | 129 session_->config()->peer_initial_flow_control_window_bytes(), |
| 130 session_->connection()->max_flow_control_receive_window_bytes(), | 130 session_->connection()->max_flow_control_receive_window_bytes(), |
| 131 session_->connection()->max_flow_control_receive_window_bytes()) { | 131 session_->connection()->max_flow_control_receive_window_bytes()) { |
| 132 if (session_->connection()->version() < QUIC_VERSION_17) { |
| 133 flow_controller_.Disable(); |
| 134 } |
| 132 } | 135 } |
| 133 | 136 |
| 134 ReliableQuicStream::~ReliableQuicStream() { | 137 ReliableQuicStream::~ReliableQuicStream() { |
| 135 } | 138 } |
| 136 | 139 |
| 137 bool ReliableQuicStream::WillAcceptStreamFrame( | 140 bool ReliableQuicStream::WillAcceptStreamFrame( |
| 138 const QuicStreamFrame& frame) const { | 141 const QuicStreamFrame& frame) const { |
| 139 if (read_side_closed_) { | 142 if (read_side_closed_) { |
| 140 return true; | 143 return true; |
| 141 } | 144 } |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { | 427 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { |
| 425 // We can write again! | 428 // We can write again! |
| 426 // TODO(rjshade): This does not respect priorities (e.g. multiple | 429 // TODO(rjshade): This does not respect priorities (e.g. multiple |
| 427 // outstanding POSTs are unblocked on arrival of | 430 // outstanding POSTs are unblocked on arrival of |
| 428 // SHLO with initial window). | 431 // SHLO with initial window). |
| 429 OnCanWrite(); | 432 OnCanWrite(); |
| 430 } | 433 } |
| 431 } | 434 } |
| 432 | 435 |
| 433 } // namespace net | 436 } // namespace net |
| OLD | NEW |