| 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 26 matching lines...) Expand all Loading... |
| 37 size_t GetReceivedFlowControlWindow(QuicSession* session) { | 37 size_t GetReceivedFlowControlWindow(QuicSession* session) { |
| 38 QuicVersion version = session->connection()->version(); | 38 QuicVersion version = session->connection()->version(); |
| 39 if (version <= QUIC_VERSION_19) { | 39 if (version <= QUIC_VERSION_19) { |
| 40 if (session->config()->HasReceivedInitialFlowControlWindowBytes()) { | 40 if (session->config()->HasReceivedInitialFlowControlWindowBytes()) { |
| 41 return session->config()->ReceivedInitialFlowControlWindowBytes(); | 41 return session->config()->ReceivedInitialFlowControlWindowBytes(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 return kDefaultFlowControlSendWindow; | 44 return kDefaultFlowControlSendWindow; |
| 45 } | 45 } |
| 46 | 46 |
| 47 // Version must be >= QUIC_VERSION_20, so we check for stream specific flow | 47 // Version must be >= QUIC_VERSION_21, so we check for stream specific flow |
| 48 // control window. | 48 // control window. |
| 49 if (session->config()->HasReceivedInitialStreamFlowControlWindowBytes()) { | 49 if (session->config()->HasReceivedInitialStreamFlowControlWindowBytes()) { |
| 50 return session->config()->ReceivedInitialStreamFlowControlWindowBytes(); | 50 return session->config()->ReceivedInitialStreamFlowControlWindowBytes(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 return kDefaultFlowControlSendWindow; | 53 return kDefaultFlowControlSendWindow; |
| 54 } | 54 } |
| 55 | 55 |
| 56 } // namespace | 56 } // namespace |
| 57 | 57 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 | 535 |
| 536 bool ReliableQuicStream::IsFlowControlBlocked() { | 536 bool ReliableQuicStream::IsFlowControlBlocked() { |
| 537 if (flow_controller_.IsBlocked()) { | 537 if (flow_controller_.IsBlocked()) { |
| 538 return true; | 538 return true; |
| 539 } | 539 } |
| 540 return stream_contributes_to_connection_flow_control_ && | 540 return stream_contributes_to_connection_flow_control_ && |
| 541 connection_flow_controller_->IsBlocked(); | 541 connection_flow_controller_->IsBlocked(); |
| 542 } | 542 } |
| 543 | 543 |
| 544 } // namespace net | 544 } // namespace net |
| OLD | NEW |