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

Side by Side Diff: net/quic/quic_packet_generator.cc

Issue 1046523002: Cache the value of GetMaxPlaintextSize in QuicPacketCreator. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_packet_generator.h" 5 #include "net/quic/quic_packet_generator.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "net/quic/quic_ack_notifier.h" 9 #include "net/quic/quic_ack_notifier.h"
10 #include "net/quic/quic_fec_group.h" 10 #include "net/quic/quic_fec_group.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 QuicPacketSequenceNumber QuicPacketGenerator::sequence_number() const { 414 QuicPacketSequenceNumber QuicPacketGenerator::sequence_number() const {
415 return packet_creator_.sequence_number(); 415 return packet_creator_.sequence_number();
416 } 416 }
417 417
418 QuicByteCount QuicPacketGenerator::max_packet_length() const { 418 QuicByteCount QuicPacketGenerator::max_packet_length() const {
419 return packet_creator_.max_packet_length(); 419 return packet_creator_.max_packet_length();
420 } 420 }
421 421
422 void QuicPacketGenerator::set_max_packet_length(QuicByteCount length) { 422 void QuicPacketGenerator::set_max_packet_length(QuicByteCount length) {
423 packet_creator_.set_max_packet_length(length); 423 packet_creator_.SetMaxPacketLength(length);
424 } 424 }
425 425
426 QuicEncryptedPacket* QuicPacketGenerator::SerializeVersionNegotiationPacket( 426 QuicEncryptedPacket* QuicPacketGenerator::SerializeVersionNegotiationPacket(
427 const QuicVersionVector& supported_versions) { 427 const QuicVersionVector& supported_versions) {
428 return packet_creator_.SerializeVersionNegotiationPacket(supported_versions); 428 return packet_creator_.SerializeVersionNegotiationPacket(supported_versions);
429 } 429 }
430 430
431 SerializedPacket QuicPacketGenerator::ReserializeAllFrames( 431 SerializedPacket QuicPacketGenerator::ReserializeAllFrames(
432 const RetransmittableFrames& frames, 432 const RetransmittableFrames& frames,
433 QuicSequenceNumberLength original_length) { 433 QuicSequenceNumberLength original_length) {
(...skipping 17 matching lines...) Expand all
451 } else { 451 } else {
452 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID); 452 packet_creator_.set_connection_id_length(PACKET_8BYTE_CONNECTION_ID);
453 } 453 }
454 } 454 }
455 455
456 456
457 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) { 457 void QuicPacketGenerator::set_encryption_level(EncryptionLevel level) {
458 packet_creator_.set_encryption_level(level); 458 packet_creator_.set_encryption_level(level);
459 } 459 }
460 460
461 void QuicPacketGenerator::SetEncrypter(EncryptionLevel level,
462 QuicEncrypter* encrypter) {
463 packet_creator_.SetEncrypter(level, encrypter);
464 }
465
461 } // namespace net 466 } // namespace net
OLDNEW
« 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