| Index: net/quic/quic_packet_generator.cc
|
| diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
|
| index d58259ad427cf1ba389150260e953d7de31ae971..275dbe06f37c3af256cfed08e8818c3183a73fdf 100644
|
| --- a/net/quic/quic_packet_generator.cc
|
| +++ b/net/quic/quic_packet_generator.cc
|
| @@ -118,11 +118,6 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(
|
| packet_creator_.Flush();
|
| }
|
|
|
| - if (fec_protection == MUST_FEC_PROTECT) {
|
| - packet_creator_.set_should_fec_protect(true);
|
| - packet_creator_.MaybeStartFecProtection();
|
| - }
|
| -
|
| if (!fin && (iov.total_length == 0)) {
|
| LOG(DFATAL) << "Attempt to consume empty data without FIN.";
|
| return QuicConsumedData(0, false);
|
| @@ -133,7 +128,7 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(
|
| QuicFrame frame;
|
| if (!packet_creator_.ConsumeData(id, iov, total_bytes_consumed,
|
| offset + total_bytes_consumed, fin,
|
| - has_handshake, &frame)) {
|
| + has_handshake, &frame, fec_protection)) {
|
| // Current packet is full and flushed.
|
| continue;
|
| }
|
| @@ -167,7 +162,7 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(
|
| if (fec_protection == MUST_FEC_PROTECT) {
|
| // Turn off FEC protection when we're done writing protected data.
|
| DVLOG(1) << "Turning FEC protection OFF";
|
| - packet_creator_.set_should_fec_protect(false);
|
| + packet_creator_.set_should_fec_protect_next_packet(false);
|
| }
|
| break;
|
| }
|
| @@ -408,7 +403,7 @@ void QuicPacketGenerator::OnSerializedPacket(
|
| if (serialized_packet->packet == nullptr) {
|
| LOG(DFATAL) << "Failed to SerializePacket. fec_policy:" << fec_send_policy()
|
| << " should_fec_protect_:"
|
| - << packet_creator_.should_fec_protect();
|
| + << packet_creator_.should_fec_protect_next_packet();
|
| delegate_->CloseConnection(QUIC_FAILED_TO_SERIALIZE_PACKET, false);
|
| return;
|
| }
|
|
|