| 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/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 20 matching lines...) Expand all Loading... |
| 31 } | 31 } |
| 32 | 32 |
| 33 // static | 33 // static |
| 34 void QuicConnectionPeer::SetSendAlgorithm( | 34 void QuicConnectionPeer::SetSendAlgorithm( |
| 35 QuicConnection* connection, | 35 QuicConnection* connection, |
| 36 SendAlgorithmInterface* send_algorithm) { | 36 SendAlgorithmInterface* send_algorithm) { |
| 37 connection->sent_packet_manager_.send_algorithm_.reset(send_algorithm); | 37 connection->sent_packet_manager_.send_algorithm_.reset(send_algorithm); |
| 38 } | 38 } |
| 39 | 39 |
| 40 // static | 40 // static |
| 41 QuicAckFrame* QuicConnectionPeer::CreateAckFrame(QuicConnection* connection) { | 41 void QuicConnectionPeer::PopulateAckFrame(QuicConnection* connection, |
| 42 return connection->CreateAckFrame(); | 42 QuicAckFrame* ack) { |
| 43 connection->PopulateAckFrame(ack); |
| 43 } | 44 } |
| 44 | 45 |
| 45 // static | 46 // static |
| 46 QuicStopWaitingFrame* QuicConnectionPeer::CreateStopWaitingFrame( | 47 void QuicConnectionPeer::PopulateStopWaitingFrame( |
| 47 QuicConnection* connection) { | 48 QuicConnection* connection, |
| 48 return connection->CreateStopWaitingFrame(); | 49 QuicStopWaitingFrame* stop_waiting) { |
| 50 connection->PopulateStopWaitingFrame(stop_waiting); |
| 49 } | 51 } |
| 50 | 52 |
| 51 // static | 53 // static |
| 52 QuicConnectionVisitorInterface* QuicConnectionPeer::GetVisitor( | 54 QuicConnectionVisitorInterface* QuicConnectionPeer::GetVisitor( |
| 53 QuicConnection* connection) { | 55 QuicConnection* connection) { |
| 54 return connection->visitor_; | 56 return connection->visitor_; |
| 55 } | 57 } |
| 56 | 58 |
| 57 // static | 59 // static |
| 58 QuicPacketCreator* QuicConnectionPeer::GetPacketCreator( | 60 QuicPacketCreator* QuicConnectionPeer::GetPacketCreator( |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 connection->sequence_number_of_last_sent_packet_ = number; | 266 connection->sequence_number_of_last_sent_packet_ = number; |
| 265 } | 267 } |
| 266 | 268 |
| 267 // static | 269 // static |
| 268 QuicConnectionStats* QuicConnectionPeer::GetStats(QuicConnection* connection) { | 270 QuicConnectionStats* QuicConnectionPeer::GetStats(QuicConnection* connection) { |
| 269 return &connection->stats_; | 271 return &connection->stats_; |
| 270 } | 272 } |
| 271 | 273 |
| 272 } // namespace test | 274 } // namespace test |
| 273 } // namespace net | 275 } // namespace net |
| OLD | NEW |