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/send_algorithm_interface.h" | 8 #include "net/quic/congestion_control/send_algorithm_interface.h" |
9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
10 #include "net/quic/quic_packet_writer.h" | 10 #include "net/quic/quic_packet_writer.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 return &connection->sent_packet_manager_; | 66 return &connection->sent_packet_manager_; |
67 } | 67 } |
68 | 68 |
69 // static | 69 // static |
70 QuicTime::Delta QuicConnectionPeer::GetNetworkTimeout( | 70 QuicTime::Delta QuicConnectionPeer::GetNetworkTimeout( |
71 QuicConnection* connection) { | 71 QuicConnection* connection) { |
72 return connection->idle_network_timeout_; | 72 return connection->idle_network_timeout_; |
73 } | 73 } |
74 | 74 |
75 // static | 75 // static |
| 76 QuicSentEntropyManager* QuicConnectionPeer::GetSentEntropyManager( |
| 77 QuicConnection* connection) { |
| 78 return &connection->sent_entropy_manager_; |
| 79 } |
| 80 |
| 81 // static |
76 // TODO(ianswett): Create a GetSentEntropyHash which accepts an AckFrame. | 82 // TODO(ianswett): Create a GetSentEntropyHash which accepts an AckFrame. |
77 QuicPacketEntropyHash QuicConnectionPeer::GetSentEntropyHash( | 83 QuicPacketEntropyHash QuicConnectionPeer::GetSentEntropyHash( |
78 QuicConnection* connection, | 84 QuicConnection* connection, |
79 QuicPacketNumber packet_number) { | 85 QuicPacketNumber packet_number) { |
80 QuicSentEntropyManager::CumulativeEntropy last_entropy_copy = | 86 QuicSentEntropyManager::CumulativeEntropy last_entropy_copy = |
81 connection->sent_entropy_manager_.last_cumulative_entropy_; | 87 connection->sent_entropy_manager_.last_cumulative_entropy_; |
82 connection->sent_entropy_manager_.UpdateCumulativeEntropy(packet_number, | 88 connection->sent_entropy_manager_.UpdateCumulativeEntropy(packet_number, |
83 &last_entropy_copy); | 89 &last_entropy_copy); |
84 return last_entropy_copy.entropy; | 90 return last_entropy_copy.entropy; |
85 } | 91 } |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 253 } |
248 | 254 |
249 // static | 255 // static |
250 void QuicConnectionPeer::SetNextMtuProbeAt(QuicConnection* connection, | 256 void QuicConnectionPeer::SetNextMtuProbeAt(QuicConnection* connection, |
251 QuicPacketNumber number) { | 257 QuicPacketNumber number) { |
252 connection->next_mtu_probe_at_ = number; | 258 connection->next_mtu_probe_at_ = number; |
253 } | 259 } |
254 | 260 |
255 } // namespace test | 261 } // namespace test |
256 } // namespace net | 262 } // namespace net |
OLD | NEW |