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

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

Issue 15074007: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_session_peer.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/quic_congestion_manager.h" 8 #include "net/quic/congestion_control/quic_congestion_manager.h"
9 #include "net/quic/congestion_control/receive_algorithm_interface.h" 9 #include "net/quic/congestion_control/receive_algorithm_interface.h"
10 #include "net/quic/congestion_control/send_algorithm_interface.h" 10 #include "net/quic/congestion_control/send_algorithm_interface.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return connection->received_truncated_ack_; 56 return connection->received_truncated_ack_;
57 } 57 }
58 58
59 // static 59 // static
60 size_t QuicConnectionPeer::GetNumRetransmissionTimeouts( 60 size_t QuicConnectionPeer::GetNumRetransmissionTimeouts(
61 QuicConnection* connection) { 61 QuicConnection* connection) {
62 return connection->retransmission_timeouts_.size(); 62 return connection->retransmission_timeouts_.size();
63 } 63 }
64 64
65 // static 65 // static
66 QuicTime::Delta QuicConnectionPeer::GetTimeout(QuicConnection* connection) {
67 return connection->timeout_;
68 }
69
70 // static
66 bool QuicConnectionPeer::IsSavedForRetransmission( 71 bool QuicConnectionPeer::IsSavedForRetransmission(
67 QuicConnection* connection, 72 QuicConnection* connection,
68 QuicPacketSequenceNumber sequence_number) { 73 QuicPacketSequenceNumber sequence_number) {
69 return ContainsKey(connection->retransmission_map_, sequence_number); 74 return ContainsKey(connection->retransmission_map_, sequence_number);
70 } 75 }
71 76
72 // static 77 // static
73 size_t QuicConnectionPeer::GetRetransmissionCount( 78 size_t QuicConnectionPeer::GetRetransmissionCount(
74 QuicConnection* connection, 79 QuicConnection* connection,
75 QuicPacketSequenceNumber sequence_number) { 80 QuicPacketSequenceNumber sequence_number) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 connection->is_server_ = is_server; 119 connection->is_server_ = is_server;
115 QuicFramerPeer::SetIsServer(&connection->framer_, is_server); 120 QuicFramerPeer::SetIsServer(&connection->framer_, is_server);
116 } 121 }
117 122
118 // static 123 // static
119 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, 124 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection,
120 QuicFramer* framer) { 125 QuicFramer* framer) {
121 framer->SwapCryptersForTest(&connection->framer_); 126 framer->SwapCryptersForTest(&connection->framer_);
122 } 127 }
123 128
129 // static
130 void QuicConnectionPeer:: SetMaxPacketsPerRetransmissionAlarm(
131 QuicConnection* connection,
132 int max_packets) {
133 connection->max_packets_per_retransmission_alarm_ = max_packets;
134 }
135
136 // static
137 QuicConnectionHelperInterface* QuicConnectionPeer::GetHelper(
138 QuicConnection* connection) {
139 return connection->helper_.get();
140 }
141
142 QuicFecGroup* QuicConnectionPeer::GetFecGroup(QuicConnection* connection,
143 int fec_group) {
144 connection->last_header_.fec_group = fec_group;
145 return connection->GetFecGroup();
146 }
147
124 } // namespace test 148 } // namespace test
125 } // namespace net 149 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.h ('k') | net/quic/test_tools/quic_session_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698