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

Unified Diff: net/quic/quic_framer.cc

Issue 887243005: Move is_fec_packet from QuicPacket to SerializedPacket in order to allow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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_connection.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_framer.cc
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 5cde3c23fcf3851ca7612ca13075fa524fe4d59c..19ae6266fd8c8b384748ed2016537c62b3e63069 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -410,7 +410,7 @@ SerializedPacket QuicFramer::BuildDataPacket(
// Less than or equal because truncated acks end up with max_plaintex_size
// length, even though they're typically slightly shorter.
DCHECK_LE(len, packet_size);
- QuicPacket* packet = QuicPacket::NewDataPacket(
+ QuicPacket* packet = new QuicPacket(
writer.take(), len, true, header.public_header.connection_id_length,
header.public_header.version_flag,
header.public_header.sequence_number_length);
@@ -445,14 +445,16 @@ SerializedPacket QuicFramer::BuildFecPacket(const QuicPacketHeader& header,
return kNoPacket;
}
- return SerializedPacket(
+ SerializedPacket packet(
header.packet_sequence_number,
header.public_header.sequence_number_length,
- QuicPacket::NewFecPacket(writer.take(), len, true,
- header.public_header.connection_id_length,
- header.public_header.version_flag,
- header.public_header.sequence_number_length),
+ new QuicPacket(writer.take(), len, true,
+ header.public_header.connection_id_length,
+ header.public_header.version_flag,
+ header.public_header.sequence_number_length),
GetPacketEntropyHash(header), nullptr);
+ packet.is_fec_packet = true;
+ return packet;
}
// static
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698