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

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

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: More tests added and some fixes. 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
Index: net/quic/test_tools/quic_test_packet_maker.cc
diff --git a/net/quic/test_tools/quic_test_packet_maker.cc b/net/quic/test_tools/quic_test_packet_maker.cc
index 91d1a6059b8a26be66a27bf7c4aa748de2131d73..eb6a54e25d34f440c86bdba4ab6d324ed5b6cbf4 100644
--- a/net/quic/test_tools/quic_test_packet_maker.cc
+++ b/net/quic/test_tools/quic_test_packet_maker.cc
@@ -33,6 +33,23 @@ void QuicTestPacketMaker::set_hostname(const std::string& host) {
host_.assign(host);
}
+scoped_ptr<QuicEncryptedPacket> QuicTestPacketMaker::MakePingPacket(
+ QuicPacketNumber num,
+ bool include_version) {
+ QuicPacketHeader header;
+ header.public_header.connection_id = connection_id_;
+ header.public_header.reset_flag = false;
+ header.public_header.version_flag = include_version;
+ header.public_header.packet_number_length = PACKET_1BYTE_PACKET_NUMBER;
+ header.packet_number = num;
+ header.entropy_flag = false;
+ header.fec_flag = false;
+ header.fec_group = 0;
+
+ QuicPingFrame ping;
+ return scoped_ptr<QuicEncryptedPacket>(MakePacket(header, QuicFrame(ping)));
+}
+
scoped_ptr<QuicEncryptedPacket> QuicTestPacketMaker::MakeRstPacket(
QuicPacketNumber num,
bool include_version,

Powered by Google App Engine
This is Rietveld 408576698