OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_stream_factory_peer.h" | 5 #include "net/quic/test_tools/quic_stream_factory_peer.h" |
6 | 6 |
7 #include "net/quic/crypto/quic_crypto_client_config.h" | 7 #include "net/quic/crypto/quic_crypto_client_config.h" |
8 #include "net/quic/quic_chromium_client_session.h" | 8 #include "net/quic/quic_chromium_client_session.h" |
9 #include "net/quic/quic_clock.h" | 9 #include "net/quic/quic_clock.h" |
10 #include "net/quic/quic_http_stream.h" | 10 #include "net/quic/quic_http_stream.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 void QuicStreamFactoryPeer::SetTaskRunner(QuicStreamFactory* factory, | 60 void QuicStreamFactoryPeer::SetTaskRunner(QuicStreamFactory* factory, |
61 base::TaskRunner* task_runner) { | 61 base::TaskRunner* task_runner) { |
62 factory->task_runner_ = task_runner; | 62 factory->task_runner_ = task_runner; |
63 } | 63 } |
64 | 64 |
65 int QuicStreamFactoryPeer::GetNumberOfLossyConnections( | 65 int QuicStreamFactoryPeer::GetNumberOfLossyConnections( |
66 QuicStreamFactory* factory, | 66 QuicStreamFactory* factory, |
67 uint16 port) { | 67 uint16_t port) { |
68 return factory->number_of_lossy_connections_[port]; | 68 return factory->number_of_lossy_connections_[port]; |
69 } | 69 } |
70 | 70 |
71 bool QuicStreamFactoryPeer::IsQuicDisabled(QuicStreamFactory* factory, | 71 bool QuicStreamFactoryPeer::IsQuicDisabled(QuicStreamFactory* factory, |
72 uint16 port) { | 72 uint16_t port) { |
73 return factory->IsQuicDisabled(port); | 73 return factory->IsQuicDisabled(port); |
74 } | 74 } |
75 | 75 |
76 bool QuicStreamFactoryPeer::GetDelayTcpRace(QuicStreamFactory* factory) { | 76 bool QuicStreamFactoryPeer::GetDelayTcpRace(QuicStreamFactory* factory) { |
77 return factory->delay_tcp_race_; | 77 return factory->delay_tcp_race_; |
78 } | 78 } |
79 | 79 |
80 void QuicStreamFactoryPeer::SetDelayTcpRace(QuicStreamFactory* factory, | 80 void QuicStreamFactoryPeer::SetDelayTcpRace(QuicStreamFactory* factory, |
81 bool delay_tcp_race) { | 81 bool delay_tcp_race) { |
82 factory->delay_tcp_race_ = delay_tcp_race; | 82 factory->delay_tcp_race_ = delay_tcp_race; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 QuicCryptoClientConfig* crypto_config = &factory->crypto_config_; | 156 QuicCryptoClientConfig* crypto_config = &factory->crypto_config_; |
157 QuicCryptoClientConfig::CachedState* cached = | 157 QuicCryptoClientConfig::CachedState* cached = |
158 crypto_config->LookupOrCreate(quic_server_id); | 158 crypto_config->LookupOrCreate(quic_server_id); |
159 QuicClock clock; | 159 QuicClock clock; |
160 cached->Initialize(server_config, source_address_token, certs, "", signature, | 160 cached->Initialize(server_config, source_address_token, certs, "", signature, |
161 clock.WallNow()); | 161 clock.WallNow()); |
162 } | 162 } |
163 | 163 |
164 } // namespace test | 164 } // namespace test |
165 } // namespace net | 165 } // namespace net |
OLD | NEW |