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

Side by Side Diff: net/quic/test_tools/quic_connection_peer.cc

Issue 476023002: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0814_2
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/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('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/test_tools/quic_connection_peer.h" 5 #include "net/quic/test_tools/quic_connection_peer.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/congestion_control/receive_algorithm_interface.h" 8 #include "net/quic/congestion_control/receive_algorithm_interface.h"
9 #include "net/quic/congestion_control/send_algorithm_interface.h" 9 #include "net/quic/congestion_control/send_algorithm_interface.h"
10 #include "net/quic/quic_connection.h" 10 #include "net/quic/quic_connection.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 // static 105 // static
106 // TODO(ianswett): Create a GetSentEntropyHash which accepts an AckFrame. 106 // TODO(ianswett): Create a GetSentEntropyHash which accepts an AckFrame.
107 QuicPacketEntropyHash QuicConnectionPeer::GetSentEntropyHash( 107 QuicPacketEntropyHash QuicConnectionPeer::GetSentEntropyHash(
108 QuicConnection* connection, 108 QuicConnection* connection,
109 QuicPacketSequenceNumber sequence_number) { 109 QuicPacketSequenceNumber sequence_number) {
110 return connection->sent_entropy_manager_.EntropyHash(sequence_number); 110 return connection->sent_entropy_manager_.EntropyHash(sequence_number);
111 } 111 }
112 112
113 // static 113 // static
114 bool QuicConnectionPeer::IsValidEntropy( 114 QuicPacketEntropyHash QuicConnectionPeer::PacketEntropy(
115 QuicConnection* connection, 115 QuicConnection* connection,
116 QuicPacketSequenceNumber largest_observed, 116 QuicPacketSequenceNumber sequence_number) {
117 const SequenceNumberSet& missing_packets, 117 return
118 QuicPacketEntropyHash entropy_hash) { 118 connection->sent_entropy_manager_.packets_entropy_[sequence_number].first;
119 return connection->sent_entropy_manager_.IsValidEntropy(
120 largest_observed, missing_packets, entropy_hash);
121 } 119 }
122 120
123 // static 121 // static
124 QuicPacketEntropyHash QuicConnectionPeer::ReceivedEntropyHash( 122 QuicPacketEntropyHash QuicConnectionPeer::ReceivedEntropyHash(
125 QuicConnection* connection, 123 QuicConnection* connection,
126 QuicPacketSequenceNumber sequence_number) { 124 QuicPacketSequenceNumber sequence_number) {
127 return connection->received_packet_manager_.EntropyHash( 125 return connection->received_packet_manager_.EntropyHash(
128 sequence_number); 126 sequence_number);
129 } 127 }
130 128
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 233 }
236 234
237 // static 235 // static
238 void QuicConnectionPeer::SetSupportedVersions(QuicConnection* connection, 236 void QuicConnectionPeer::SetSupportedVersions(QuicConnection* connection,
239 QuicVersionVector versions) { 237 QuicVersionVector versions) {
240 connection->framer_.SetSupportedVersions(versions); 238 connection->framer_.SetSupportedVersions(versions);
241 } 239 }
242 240
243 } // namespace test 241 } // namespace test
244 } // namespace net 242 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698