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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 1531603002: Set QuicPacketCreator's should_fec_protect_next_packet only within QuicPacketCreator. No functiona… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110173060
Patch Set: Created 5 years 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/quic_packet_creator.h ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator.cc
diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
index 58aaa85223ec73ebba996344a4ad39579644b1ec..5151613fb13f57f1a0f866fa263ea31c95907b96 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -271,6 +271,12 @@ bool QuicPacketCreator::ConsumeData(QuicStreamId id,
needs_padding_ = true;
}
DCHECK(success);
+ if (fec_protection == MUST_FEC_PROTECT &&
+ iov_offset + frame->stream_frame->frame_length == iov.total_length) {
+ // Turn off FEC protection when we're done writing protected data.
+ DVLOG(1) << "Turning FEC protection OFF";
+ should_fec_protect_next_packet_ = false;
+ }
return true;
}
@@ -459,7 +465,7 @@ void QuicPacketCreator::Flush() {
void QuicPacketCreator::OnSerializedPacket(SerializedPacket* packet) {
if (packet->packet == nullptr) {
LOG(DFATAL) << "Failed to SerializePacket. fec_policy:" << fec_send_policy()
- << " should_fec_protect_:" << should_fec_protect_next_packet();
+ << " should_fec_protect_:" << should_fec_protect_next_packet_;
delegate_->CloseConnection(QUIC_FAILED_TO_SERIALIZE_PACKET, false);
return;
}
« no previous file with comments | « net/quic/quic_packet_creator.h ('k') | net/quic/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698