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

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

Issue 424003002: Inline the members of QUIC's ReceivedPacketInfo into QuicAckFrame now (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_FixRate_congestion_type_71746617
Patch Set: Created 6 years, 4 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_creator.cc ('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_creator.h" 5 #include "net/quic/quic_packet_creator.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/null_encrypter.h" 8 #include "net/quic/crypto/null_encrypter.h"
9 #include "net/quic/crypto/quic_decrypter.h" 9 #include "net/quic/crypto/quic_decrypter.h"
10 #include "net/quic/crypto/quic_encrypter.h" 10 #include "net/quic/crypto/quic_encrypter.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Returns the number of bytes of overhead that will be added to a packet 111 // Returns the number of bytes of overhead that will be added to a packet
112 // of maximum length. 112 // of maximum length.
113 size_t GetEncryptionOverhead() { 113 size_t GetEncryptionOverhead() {
114 return creator_.max_packet_length() - client_framer_.GetMaxPlaintextSize( 114 return creator_.max_packet_length() - client_framer_.GetMaxPlaintextSize(
115 creator_.max_packet_length()); 115 creator_.max_packet_length());
116 } 116 }
117 117
118 // Returns the number of bytes consumed by the non-data fields of a stream 118 // Returns the number of bytes consumed by the non-data fields of a stream
119 // frame, assuming it is the last frame in the packet 119 // frame, assuming it is the last frame in the packet
120 size_t GetStreamFrameOverhead(InFecGroup is_in_fec_group) { 120 size_t GetStreamFrameOverhead(InFecGroup is_in_fec_group) {
121 return QuicFramer::GetMinStreamFrameSize(client_framer_.version(), 121 return QuicFramer::GetMinStreamFrameSize(kClientDataStreamId1, kOffset,
122 kClientDataStreamId1, kOffset,
123 true, is_in_fec_group); 122 true, is_in_fec_group);
124 } 123 }
125 124
126 // Enables and turns on FEC protection. Returns true if FEC protection is on. 125 // Enables and turns on FEC protection. Returns true if FEC protection is on.
127 bool SwitchFecProtectionOn(size_t max_packets_per_fec_group) { 126 bool SwitchFecProtectionOn(size_t max_packets_per_fec_group) {
128 creator_.set_max_packets_per_fec_group(max_packets_per_fec_group); 127 creator_.set_max_packets_per_fec_group(max_packets_per_fec_group);
129 creator_.StartFecProtectingPackets(); 128 creator_.StartFecProtectingPackets();
130 return creator_.IsFecProtected(); 129 return creator_.IsFecProtected();
131 } 130 }
132 131
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 // After 64 calls, BoolSource will refresh the bucket - make sure it does. 1012 // After 64 calls, BoolSource will refresh the bucket - make sure it does.
1014 mock_random_.ChangeValue(); 1013 mock_random_.ChangeValue();
1015 } 1014 }
1016 1015
1017 delete frames_[0].stream_frame; 1016 delete frames_[0].stream_frame;
1018 } 1017 }
1019 1018
1020 } // namespace 1019 } // namespace
1021 } // namespace test 1020 } // namespace test
1022 } // namespace net 1021 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698