| Index: net/quic/reliable_quic_stream.cc
|
| diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
|
| index 6bef6c43854d70aa653a1df3dbc2dc284828a43c..e33fb972dfe589782da3eb6439bdaa1716c5d669 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_(PROTECT_OPTIONAL),
|
| is_server_(session_->is_server()),
|
| flow_controller_(
|
| session_->connection(),
|
| @@ -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_ == PROTECT_ALWAYS ? MUST_FEC_PROTECT : MAY_FEC_PROTECT;
|
| +}
|
| +
|
| void ReliableQuicStream::CloseReadSide() {
|
| if (read_side_closed_) {
|
| return;
|
|
|