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

Unified Diff: net/quic/quic_packet_creator.h

Issue 1037403004: Land Recent QUIC Changes until 03/27/2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 9 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_http_stream_test.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_creator.h
diff --git a/net/quic/quic_packet_creator.h b/net/quic/quic_packet_creator.h
index fc76f5b96f26b3d43cdfdd03488696b7b98bd8a1..4b5971c7709d72bc3d90d93349a74b6b97c131a6 100644
--- a/net/quic/quic_packet_creator.h
+++ b/net/quic/quic_packet_creator.h
@@ -9,6 +9,7 @@
#ifndef NET_QUIC_QUIC_PACKET_CREATOR_H_
#define NET_QUIC_QUIC_PACKET_CREATOR_H_
+#include <string>
#include <utility>
#include <vector>
@@ -191,11 +192,12 @@ class NET_EXPORT_PRIVATE QuicPacketCreator : public QuicFecBuilderInterface {
return max_packet_length_;
}
- void set_max_packet_length(QuicByteCount length) {
- // |max_packet_length_| should not be changed mid-packet or mid-FEC group.
- DCHECK(fec_group_.get() == nullptr && queued_frames_.empty());
- max_packet_length_ = length;
- }
+ // Sets the encrypter to use for the encryption level and updates the max
+ // plaintext size.
+ void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
+
+ // Sets the maximum packet length.
+ void SetMaxPacketLength(QuicByteCount length);
// Returns current max number of packets covered by an FEC group.
size_t max_packets_per_fec_group() const {
@@ -265,6 +267,7 @@ class NET_EXPORT_PRIVATE QuicPacketCreator : public QuicFecBuilderInterface {
// packet_size_ is mutable because it's just a cache of the current size.
// packet_size should never be read directly, use PacketSize() instead.
mutable size_t packet_size_;
+ mutable size_t max_plaintext_size_;
QuicFrames queued_frames_;
scoped_ptr<RetransmittableFrames> queued_retransmittable_frames_;
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_packet_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698