| 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/core/congestion_control/send_algorithm_interface.h" | 8 #include "net/quic/core/congestion_control/send_algorithm_interface.h" |
| 9 #include "net/quic/core/quic_multipath_sent_packet_manager.h" | 9 #include "net/quic/core/quic_multipath_sent_packet_manager.h" |
| 10 #include "net/quic/core/quic_packet_writer.h" | 10 #include "net/quic/core/quic_packet_writer.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 return connection->multipath_enabled_; | 152 return connection->multipath_enabled_; |
| 153 } | 153 } |
| 154 | 154 |
| 155 // static | 155 // static |
| 156 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, | 156 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, |
| 157 QuicFramer* framer) { | 157 QuicFramer* framer) { |
| 158 QuicFramerPeer::SwapCrypters(framer, &connection->framer_); | 158 QuicFramerPeer::SwapCrypters(framer, &connection->framer_); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // static | 161 // static |
| 162 void QuicConnectionPeer::SetCurrentPacket(QuicConnection* connection, |
| 163 base::StringPiece current_packet) { |
| 164 connection->current_packet_data_ = current_packet.data(); |
| 165 connection->last_size_ = current_packet.size(); |
| 166 } |
| 167 |
| 168 // static |
| 162 QuicConnectionHelperInterface* QuicConnectionPeer::GetHelper( | 169 QuicConnectionHelperInterface* QuicConnectionPeer::GetHelper( |
| 163 QuicConnection* connection) { | 170 QuicConnection* connection) { |
| 164 return connection->helper_; | 171 return connection->helper_; |
| 165 } | 172 } |
| 166 | 173 |
| 167 // static | 174 // static |
| 168 QuicAlarmFactory* QuicConnectionPeer::GetAlarmFactory( | 175 QuicAlarmFactory* QuicConnectionPeer::GetAlarmFactory( |
| 169 QuicConnection* connection) { | 176 QuicConnection* connection) { |
| 170 return connection->alarm_factory_; | 177 return connection->alarm_factory_; |
| 171 } | 178 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 bool QuicConnectionPeer::HasRetransmittableFrames( | 304 bool QuicConnectionPeer::HasRetransmittableFrames( |
| 298 QuicConnection* connection, | 305 QuicConnection* connection, |
| 299 QuicPathId path_id, | 306 QuicPathId path_id, |
| 300 QuicPacketNumber packet_number) { | 307 QuicPacketNumber packet_number) { |
| 301 return QuicSentPacketManagerPeer::HasRetransmittableFrames( | 308 return QuicSentPacketManagerPeer::HasRetransmittableFrames( |
| 302 GetSentPacketManager(connection, path_id), packet_number); | 309 GetSentPacketManager(connection, path_id), packet_number); |
| 303 } | 310 } |
| 304 | 311 |
| 305 } // namespace test | 312 } // namespace test |
| 306 } // namespace net | 313 } // namespace net |
| OLD | NEW |