OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_config_peer.h" | 5 #include "net/quic/test_tools/quic_config_peer.h" |
6 | 6 |
7 #include "net/quic/quic_config.h" | 7 #include "net/quic/quic_config.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 namespace test { | 10 namespace test { |
11 | 11 |
12 // static | 12 // static |
13 void QuicConfigPeer::SetReceivedInitialWindow(QuicConfig* config, | 13 void QuicConfigPeer::SetReceivedInitialWindow(QuicConfig* config, |
14 size_t initial_window) { | 14 size_t initial_window) { |
15 config->initial_congestion_window_.SetReceivedValue(initial_window); | 15 config->initial_congestion_window_.SetReceivedValue(initial_window); |
16 } | 16 } |
17 | 17 |
18 // static | 18 // static |
| 19 void QuicConfigPeer::SetReceivedSocketReceiveBuffer( |
| 20 QuicConfig* config, |
| 21 uint32 receive_buffer_bytes) { |
| 22 config->socket_receive_buffer_.SetReceivedValue(receive_buffer_bytes); |
| 23 } |
| 24 |
| 25 // static |
19 void QuicConfigPeer::SetReceivedInitialFlowControlWindow(QuicConfig* config, | 26 void QuicConfigPeer::SetReceivedInitialFlowControlWindow(QuicConfig* config, |
20 uint32 window_bytes) { | 27 uint32 window_bytes) { |
21 config->initial_flow_control_window_bytes_.SetReceivedValue(window_bytes); | 28 config->initial_flow_control_window_bytes_.SetReceivedValue(window_bytes); |
22 } | 29 } |
23 | 30 |
24 // static | 31 // static |
25 void QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( | 32 void QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( |
26 QuicConfig* config, | 33 QuicConfig* config, |
27 uint32 window_bytes) { | 34 uint32 window_bytes) { |
28 config->initial_stream_flow_control_window_bytes_.SetReceivedValue( | 35 config->initial_stream_flow_control_window_bytes_.SetReceivedValue( |
29 window_bytes); | 36 window_bytes); |
30 } | 37 } |
31 | 38 |
32 // static | 39 // static |
33 void QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow( | 40 void QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow( |
34 QuicConfig* config, | 41 QuicConfig* config, |
35 uint32 window_bytes) { | 42 uint32 window_bytes) { |
36 config->initial_session_flow_control_window_bytes_.SetReceivedValue( | 43 config->initial_session_flow_control_window_bytes_.SetReceivedValue( |
37 window_bytes); | 44 window_bytes); |
38 } | 45 } |
39 | 46 |
40 // static | 47 // static |
41 void QuicConfigPeer::SetReceivedConnectionOptions( | 48 void QuicConfigPeer::SetReceivedConnectionOptions( |
42 QuicConfig* config, | 49 QuicConfig* config, |
43 const QuicTagVector& options) { | 50 const QuicTagVector& options) { |
44 config->connection_options_.SetReceivedValues(options); | 51 config->connection_options_.SetReceivedValues(options); |
45 } | 52 } |
46 | 53 |
| 54 // static |
| 55 void QuicConfigPeer::SetReceivedBytesForConnectionId(QuicConfig* config, |
| 56 uint32 bytes) { |
| 57 config->bytes_for_connection_id_.SetReceivedValue(bytes); |
| 58 } |
| 59 |
47 } // namespace test | 60 } // namespace test |
48 } // namespace net | 61 } // namespace net |
OLD | NEW |