Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Unified Diff: net/quic/reliable_quic_stream.cc

Issue 330333006: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linus_tsan error - reverted the change to ConnectionMigrationClientPortChanged unitttest Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.cc
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 32ef6d32a92aa5514637152e97c57412811b2591..a98e22dd5e60084d865ae648ef539f1c5f0e891d 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -124,6 +124,7 @@ ReliableQuicStream::ReliableQuicStream(QuicStreamId id, QuicSession* session)
fin_received_(false),
rst_sent_(false),
rst_received_(false),
+ fec_policy_(FEC_PROTECT_OPTIONAL),
is_server_(session_->is_server()),
flow_controller_(
session_->connection(),
@@ -132,8 +133,8 @@ ReliableQuicStream::ReliableQuicStream(QuicStreamId id, QuicSession* session)
session_->config()->HasReceivedInitialFlowControlWindowBytes() ?
session_->config()->ReceivedInitialFlowControlWindowBytes() :
kDefaultFlowControlSendWindow,
- session_->max_flow_control_receive_window_bytes(),
- session_->max_flow_control_receive_window_bytes()),
+ session_->config()->GetInitialFlowControlWindowToSend(),
+ session_->config()->GetInitialFlowControlWindowToSend()),
connection_flow_controller_(session_->flow_controller()) {
}
@@ -360,9 +361,8 @@ QuicConsumedData ReliableQuicStream::WritevData(
IOVector data;
data.AppendIovecAtMostBytes(iov, iov_count, write_length);
- // TODO(jri): Use the correct FecProtection based on FecPolicy on stream.
QuicConsumedData consumed_data = session()->WritevData(
- id(), data, stream_bytes_written_, fin, MAY_FEC_PROTECT,
+ id(), data, stream_bytes_written_, fin, GetFecProtection(),
ack_notifier_delegate);
stream_bytes_written_ += consumed_data.bytes_consumed;
@@ -384,6 +384,10 @@ QuicConsumedData ReliableQuicStream::WritevData(
return consumed_data;
}
+FecProtection ReliableQuicStream::GetFecProtection() {
+ return fec_policy_ == FEC_PROTECT_ALWAYS ? MUST_FEC_PROTECT : MAY_FEC_PROTECT;
+}
+
void ReliableQuicStream::CloseReadSide() {
if (read_side_closed_) {
return;
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698