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 "net/quic/core/congestion_control/send_algorithm_interface.h" | 7 #include "net/quic/core/congestion_control/send_algorithm_interface.h" |
8 #include "net/quic/core/quic_flags.h" | 8 #include "net/quic/core/quic_flags.h" |
9 #include "net/quic/core/quic_packet_writer.h" | 9 #include "net/quic/core/quic_packet_writer.h" |
10 #include "net/quic/core/quic_received_packet_manager.h" | 10 #include "net/quic/core/quic_received_packet_manager.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 connection->peer_address_ = peer_address; | 97 connection->peer_address_ = peer_address; |
98 } | 98 } |
99 | 99 |
100 // static | 100 // static |
101 bool QuicConnectionPeer::IsSilentCloseEnabled(QuicConnection* connection) { | 101 bool QuicConnectionPeer::IsSilentCloseEnabled(QuicConnection* connection) { |
102 return connection->idle_timeout_connection_close_behavior_ == | 102 return connection->idle_timeout_connection_close_behavior_ == |
103 ConnectionCloseBehavior::SILENT_CLOSE; | 103 ConnectionCloseBehavior::SILENT_CLOSE; |
104 } | 104 } |
105 | 105 |
106 // static | 106 // static |
107 bool QuicConnectionPeer::IsMultipathEnabled(QuicConnection* connection) { | |
108 return connection->multipath_enabled_; | |
109 } | |
110 | |
111 // static | |
112 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, | 107 void QuicConnectionPeer::SwapCrypters(QuicConnection* connection, |
113 QuicFramer* framer) { | 108 QuicFramer* framer) { |
114 QuicFramerPeer::SwapCrypters(framer, &connection->framer_); | 109 QuicFramerPeer::SwapCrypters(framer, &connection->framer_); |
115 } | 110 } |
116 | 111 |
117 // static | 112 // static |
118 void QuicConnectionPeer::SetCurrentPacket(QuicConnection* connection, | 113 void QuicConnectionPeer::SetCurrentPacket(QuicConnection* connection, |
119 QuicStringPiece current_packet) { | 114 QuicStringPiece current_packet) { |
120 connection->current_packet_data_ = current_packet.data(); | 115 connection->current_packet_data_ = current_packet.data(); |
121 connection->last_size_ = current_packet.size(); | 116 connection->last_size_ = current_packet.size(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 } | 253 } |
259 | 254 |
260 // static | 255 // static |
261 void QuicConnectionPeer::SetNoStopWaitingFrames(QuicConnection* connection, | 256 void QuicConnectionPeer::SetNoStopWaitingFrames(QuicConnection* connection, |
262 bool no_stop_waiting_frames) { | 257 bool no_stop_waiting_frames) { |
263 connection->no_stop_waiting_frames_ = no_stop_waiting_frames; | 258 connection->no_stop_waiting_frames_ = no_stop_waiting_frames; |
264 } | 259 } |
265 | 260 |
266 } // namespace test | 261 } // namespace test |
267 } // namespace net | 262 } // namespace net |
OLD | NEW |