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::SetReceivedLossDetection(QuicConfig* config, | 19 void QuicConfigPeer::SetReceivedLossDetection(QuicConfig* config, |
20 QuicTag loss_detection) { | 20 QuicTag loss_detection) { |
21 config->loss_detection_.SetReceivedValue(loss_detection); | 21 config->loss_detection_.SetReceivedValue(loss_detection); |
22 } | 22 } |
23 | 23 |
24 // static | 24 // static |
25 void QuicConfigPeer::SetReceivedInitialFlowControlWindow(QuicConfig* config, | 25 void QuicConfigPeer::SetReceivedInitialFlowControlWindow(QuicConfig* config, |
26 uint32 window_bytes) { | 26 uint32 window_bytes) { |
27 config->initial_flow_control_window_bytes_.SetReceivedValue(window_bytes); | 27 config->initial_flow_control_window_bytes_.SetReceivedValue(window_bytes); |
28 } | 28 } |
29 | 29 |
| 30 // static |
| 31 void QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow( |
| 32 QuicConfig* config, uint32 window_bytes) { |
| 33 config->initial_stream_flow_control_window_bytes_.SetReceivedValue( |
| 34 window_bytes); |
| 35 } |
| 36 |
| 37 // static |
| 38 void QuicConfigPeer::SetReceivedInitialSessionFlowControlWindow( |
| 39 QuicConfig* config, uint32 window_bytes) { |
| 40 config->initial_session_flow_control_window_bytes_.SetReceivedValue( |
| 41 window_bytes); |
| 42 } |
| 43 |
30 } // namespace test | 44 } // namespace test |
31 } // namespace net | 45 } // namespace net |
OLD | NEW |