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_flags.h" | 9 #include "net/quic/quic_flags.h" |
10 #include "net/quic/quic_flow_controller.h" | 10 #include "net/quic/quic_flow_controller.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 session_->flow_controller()->auto_tune_receive_window()), | 137 session_->flow_controller()->auto_tune_receive_window()), |
138 connection_flow_controller_(session_->flow_controller()), | 138 connection_flow_controller_(session_->flow_controller()), |
139 stream_contributes_to_connection_flow_control_(true) { | 139 stream_contributes_to_connection_flow_control_(true) { |
140 SetFromConfig(); | 140 SetFromConfig(); |
141 } | 141 } |
142 | 142 |
143 ReliableQuicStream::~ReliableQuicStream() { | 143 ReliableQuicStream::~ReliableQuicStream() { |
144 } | 144 } |
145 | 145 |
146 void ReliableQuicStream::SetFromConfig() { | 146 void ReliableQuicStream::SetFromConfig() { |
147 if (FLAGS_quic_send_fec_packet_only_on_fec_alarm && | 147 if (session_->config()->HasClientSentConnectionOption(kFSTR, perspective_)) { |
148 session_->config()->HasClientSentConnectionOption(kFSTR, perspective_)) { | |
149 fec_policy_ = FEC_PROTECT_ALWAYS; | 148 fec_policy_ = FEC_PROTECT_ALWAYS; |
150 } | 149 } |
151 } | 150 } |
152 | 151 |
153 void ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) { | 152 void ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) { |
154 if (read_side_closed_) { | 153 if (read_side_closed_) { |
155 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; | 154 DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id; |
156 // The subclass does not want read data: blackhole the data. | 155 // The subclass does not want read data: blackhole the data. |
157 return; | 156 return; |
158 } | 157 } |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 } | 529 } |
531 } | 530 } |
532 | 531 |
533 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { | 532 void ReliableQuicStream::UpdateSendWindowOffset(QuicStreamOffset new_window) { |
534 if (flow_controller_.UpdateSendWindowOffset(new_window)) { | 533 if (flow_controller_.UpdateSendWindowOffset(new_window)) { |
535 OnCanWrite(); | 534 OnCanWrite(); |
536 } | 535 } |
537 } | 536 } |
538 | 537 |
539 } // namespace net | 538 } // namespace net |
OLD | NEW |