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

Unified Diff: net/quic/quic_packet_generator.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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_generator.h ('k') | net/quic/quic_packet_generator_test.cc » ('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 11a45cc984f652da63217c0def07422c98f28c5a..454d77e03ab2d4a91f2f2201243e804e68312c3b 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -384,6 +384,19 @@ void QuicPacketGenerator::UpdateSequenceNumberLength(
least_packet_awaited_by_peer, congestion_window);
}
+void QuicPacketGenerator::SetConnectionIdLength(uint32 length) {
+ if (length == 0) {
+ packet_creator_.set_connection_id_length(PACKET_0BYTE_CONNECTION_ID);
+ } else if (length == 1) {
+ packet_creator_.set_connection_id_length(PACKET_1BYTE_CONNECTION_ID);
+ } else if (length <= 4) {
+ packet_creator_.set_connection_id_length(PACKET_4BYTE_CONNECTION_ID);
+ } else {
+ packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID);
+ }
+}
+
+
void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) {
packet_creator_.set_encryption_level(level);
}
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698