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

Unified Diff: net/quic/quic_packet_generator.cc

Issue 242593002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Use uint32 instead of int Created 6 years, 8 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_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index cd2013e24f79826ea317092525eb4d7c701570b3..25c7446810b04b90cf5fc85afa775c297324f88d 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -146,6 +146,8 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(QuicStreamId id,
// Ensure the FEC group is closed at the end of this method if not in batch
// mode.
if (!InBatchMode() && packet_creator_->ShouldSendFec(true)) {
+ // TODO(jri): SerializeFec can return a NULL packet, and this should
+ // cause an early return, with a call to delegate_->OnPacketGenerationError.
SerializedPacket serialized_fec = packet_creator_->SerializeFec();
DCHECK(serialized_fec.packet);
delegate_->OnSerializedPacket(serialized_fec);
@@ -185,6 +187,9 @@ void QuicPacketGenerator::SendQueuedFrames(bool flush) {
// Ensure the FEC group is closed at the end of this method unless other
// writes are pending.
if (packet_creator_->ShouldSendFec(true)) {
+ // TODO(jri): SerializeFec can return a NULL packet, and this should
+ // cause an early return, with a call to
+ // delegate_->OnPacketGenerationError.
SerializedPacket serialized_fec = packet_creator_->SerializeFec();
DCHECK(serialized_fec.packet);
delegate_->OnSerializedPacket(serialized_fec);
@@ -271,6 +276,8 @@ void QuicPacketGenerator::SerializeAndSendPacket() {
delegate_->OnSerializedPacket(serialized_packet);
if (packet_creator_->ShouldSendFec(false)) {
+ // TODO(jri): SerializeFec can return a NULL packet, and this should
+ // cause an early return, with a call to delegate_->OnPacketGenerationError.
SerializedPacket serialized_fec = packet_creator_->SerializeFec();
DCHECK(serialized_fec.packet);
delegate_->OnSerializedPacket(serialized_fec);
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698