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

Unified Diff: net/quic/quic_packet_creator.cc

Issue 327393002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error 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/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 f7d2d14a13f9e54e5ea5dc8989539478abe37836..0c40a7ce04dcef38514932fd7ba976e77d078eb6 100644
--- a/net/quic/quic_packet_creator.cc
+++ b/net/quic/quic_packet_creator.cc
@@ -89,11 +89,16 @@ void QuicPacketCreator::OnBuiltFecProtectedPayload(
}
bool QuicPacketCreator::ShouldSendFec(bool force_close) const {
+ DCHECK(!HasPendingFrames());
return fec_group_.get() != NULL && fec_group_->NumReceivedPackets() > 0 &&
(force_close || fec_group_->NumReceivedPackets() >=
max_packets_per_fec_group_);
}
+bool QuicPacketCreator::IsFecGroupOpen() const {
+ return ShouldSendFec(true);
+}
+
void QuicPacketCreator::StartFecProtectingPackets() {
if (!IsFecEnabled()) {
LOG(DFATAL) << "Cannot start FEC protection when FEC is not enabled.";
@@ -305,7 +310,7 @@ SerializedPacket QuicPacketCreator::SerializeAllFrames(
return packet;
}
-bool QuicPacketCreator::HasPendingFrames() {
+bool QuicPacketCreator::HasPendingFrames() const {
return !queued_frames_.empty();
}
« 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