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" |
11 #include "net/quic/quic_connection.h" | 11 #include "net/quic/quic_connection.h" |
| 12 #include "net/quic/test_tools/quic_framer_peer.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 namespace test { | 15 namespace test { |
15 | 16 |
16 // static | 17 // static |
17 void QuicConnectionPeer::SendAck(QuicConnection* connection) { | 18 void QuicConnectionPeer::SendAck(QuicConnection* connection) { |
18 connection->SendAck(); | 19 connection->SendAck(); |
19 } | 20 } |
20 | 21 |
21 // static | 22 // static |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 largest_observed, missing_packets, entropy_hash); | 96 largest_observed, missing_packets, entropy_hash); |
96 } | 97 } |
97 | 98 |
98 // static | 99 // static |
99 QuicPacketEntropyHash QuicConnectionPeer::ReceivedEntropyHash( | 100 QuicPacketEntropyHash QuicConnectionPeer::ReceivedEntropyHash( |
100 QuicConnection* connection, | 101 QuicConnection* connection, |
101 QuicPacketSequenceNumber sequence_number) { | 102 QuicPacketSequenceNumber sequence_number) { |
102 return connection->entropy_manager_.ReceivedEntropyHash(sequence_number); | 103 return connection->entropy_manager_.ReceivedEntropyHash(sequence_number); |
103 } | 104 } |
104 | 105 |
| 106 // static |
| 107 bool QuicConnectionPeer::IsServer(QuicConnection* connection) { |
| 108 return connection->is_server_; |
| 109 } |
| 110 |
| 111 // static |
| 112 void QuicConnectionPeer::SetIsServer(QuicConnection* connection, |
| 113 bool is_server) { |
| 114 connection->is_server_ = is_server; |
| 115 QuicFramerPeer::SetIsServer(&connection->framer_, is_server); |
| 116 } |
| 117 |
105 } // namespace test | 118 } // namespace test |
106 } // namespace net | 119 } // namespace net |
OLD | NEW |