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

Unified Diff: net/quic/test_tools/quic_test_utils.cc

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 Created 6 years, 5 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
Index: net/quic/test_tools/quic_test_utils.cc
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 9b54f94030af0d0365bccee4af8f661ee77e6671..c781b23c5e939b50c0f824a1d07a9b83edb9c208 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -43,23 +43,19 @@ class TestAlarm : public QuicAlarm {
} // namespace
-QuicAckFrame MakeAckFrame(QuicPacketSequenceNumber largest_observed,
- QuicPacketSequenceNumber least_unacked) {
+QuicAckFrame MakeAckFrame(QuicPacketSequenceNumber largest_observed) {
QuicAckFrame ack;
- ack.received_info.largest_observed = largest_observed;
- ack.received_info.entropy_hash = 0;
- ack.sent_info.least_unacked = least_unacked;
- ack.sent_info.entropy_hash = 0;
+ ack.largest_observed = largest_observed;
+ ack.entropy_hash = 0;
return ack;
}
QuicAckFrame MakeAckFrameWithNackRanges(
size_t num_nack_ranges, QuicPacketSequenceNumber least_unacked) {
- QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked,
- least_unacked);
+ QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked);
// Add enough missing packets to get num_nack_ranges nack ranges.
for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) {
- ack.received_info.missing_packets.insert(least_unacked + i);
+ ack.missing_packets.insert(least_unacked + i);
}
return ack;
}
@@ -562,11 +558,11 @@ size_t GetPacketLengthForOneStream(
const size_t stream_length =
NullEncrypter().GetCiphertextSize(*payload_length) +
QuicPacketCreator::StreamFramePacketOverhead(
- version, PACKET_8BYTE_CONNECTION_ID, include_version,
+ PACKET_8BYTE_CONNECTION_ID, include_version,
sequence_number_length, 0u, is_in_fec_group);
const size_t ack_length = NullEncrypter().GetCiphertextSize(
QuicFramer::GetMinAckFrameSize(
- version, sequence_number_length, PACKET_1BYTE_SEQUENCE_NUMBER)) +
+ sequence_number_length, PACKET_1BYTE_SEQUENCE_NUMBER)) +
GetPacketHeaderSize(PACKET_8BYTE_CONNECTION_ID, include_version,
sequence_number_length, is_in_fec_group);
if (stream_length < ack_length) {
@@ -575,7 +571,7 @@ size_t GetPacketLengthForOneStream(
return NullEncrypter().GetCiphertextSize(*payload_length) +
QuicPacketCreator::StreamFramePacketOverhead(
- version, PACKET_8BYTE_CONNECTION_ID, include_version,
+ PACKET_8BYTE_CONNECTION_ID, include_version,
sequence_number_length, 0u, is_in_fec_group);
}

Powered by Google App Engine
This is Rietveld 408576698