OLD | NEW |
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 QuicFramerPeer::SetIsServer(&connection->framer_, is_server); | 120 QuicFramerPeer::SetIsServer(&connection->framer_, is_server); |
121 } | 121 } |
122 | 122 |
123 // static | 123 // static |
124 void QuicConnectionPeer::SetSelfAddress(QuicConnection* connection, | 124 void QuicConnectionPeer::SetSelfAddress(QuicConnection* connection, |
125 const IPEndPoint& self_address) { | 125 const IPEndPoint& self_address) { |
126 connection->self_address_ = self_address; | 126 connection->self_address_ = self_address; |
127 } | 127 } |
128 | 128 |
129 // static | 129 // static |
| 130 void QuicConnectionPeer::SetPeerAddress(QuicConnection* connection, |
| 131 const IPEndPoint& peer_address) { |
| 132 connection->peer_address_ = peer_address; |
| 133 } |
| 134 |
| 135 // static |
130 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, | 136 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, |
131 QuicFramer* framer) { | 137 QuicFramer* framer) { |
132 framer->SwapCryptersForTest(&connection->framer_); | 138 framer->SwapCryptersForTest(&connection->framer_); |
133 } | 139 } |
134 | 140 |
135 // static | 141 // static |
136 void QuicConnectionPeer:: SetMaxPacketsPerRetransmissionAlarm( | 142 void QuicConnectionPeer:: SetMaxPacketsPerRetransmissionAlarm( |
137 QuicConnection* connection, | 143 QuicConnection* connection, |
138 int max_packets) { | 144 int max_packets) { |
139 connection->max_packets_per_retransmission_alarm_ = max_packets; | 145 connection->max_packets_per_retransmission_alarm_ = max_packets; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 return connection->send_alarm_.get(); | 178 return connection->send_alarm_.get(); |
173 } | 179 } |
174 | 180 |
175 // static | 181 // static |
176 QuicAlarm* QuicConnectionPeer::GetTimeoutAlarm(QuicConnection* connection) { | 182 QuicAlarm* QuicConnectionPeer::GetTimeoutAlarm(QuicConnection* connection) { |
177 return connection->timeout_alarm_.get(); | 183 return connection->timeout_alarm_.get(); |
178 } | 184 } |
179 | 185 |
180 } // namespace test | 186 } // namespace test |
181 } // namespace net | 187 } // namespace net |
OLD | NEW |