| 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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 static std::unique_ptr<QuicHttpStream> CreateFromSession( | 47 static std::unique_ptr<QuicHttpStream> CreateFromSession( |
| 48 QuicStreamFactory* factory, | 48 QuicStreamFactory* factory, |
| 49 QuicChromiumClientSession* session); | 49 QuicChromiumClientSession* session); |
| 50 | 50 |
| 51 static bool IsLiveSession(QuicStreamFactory* factory, | 51 static bool IsLiveSession(QuicStreamFactory* factory, |
| 52 QuicChromiumClientSession* session); | 52 QuicChromiumClientSession* session); |
| 53 | 53 |
| 54 static void SetTaskRunner(QuicStreamFactory* factory, | 54 static void SetTaskRunner(QuicStreamFactory* factory, |
| 55 base::TaskRunner* task_runner); | 55 base::TaskRunner* task_runner); |
| 56 | 56 |
| 57 static int GetNumberOfLossyConnections(QuicStreamFactory* factory, |
| 58 uint16_t port); |
| 59 |
| 57 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); | 60 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); |
| 58 | 61 |
| 59 static bool IsQuicDisabled(QuicStreamFactory* factory); | 62 static bool IsQuicDisabled(QuicStreamFactory* factory, uint16_t port); |
| 60 | 63 |
| 61 static bool GetDelayTcpRace(QuicStreamFactory* factory); | 64 static bool GetDelayTcpRace(QuicStreamFactory* factory); |
| 62 | 65 |
| 63 static void SetDelayTcpRace(QuicStreamFactory* factory, bool delay_tcp_race); | 66 static void SetDelayTcpRace(QuicStreamFactory* factory, bool delay_tcp_race); |
| 64 | 67 |
| 65 static bool GetRaceCertVerification(QuicStreamFactory* factory); | 68 static bool GetRaceCertVerification(QuicStreamFactory* factory); |
| 66 | 69 |
| 67 static void SetRaceCertVerification(QuicStreamFactory* factory, | 70 static void SetRaceCertVerification(QuicStreamFactory* factory, |
| 68 bool race_cert_verification); | 71 bool race_cert_verification); |
| 69 | 72 |
| 70 static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory, | 73 static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory, |
| 71 const QuicServerId& server_id, | 74 const QuicServerId& server_id, |
| 72 int cert_verify_flags, | 75 int cert_verify_flags, |
| 73 const BoundNetLog& net_log); | 76 const BoundNetLog& net_log); |
| 74 | 77 |
| 75 static void SetYieldAfterPackets(QuicStreamFactory* factory, | 78 static void SetYieldAfterPackets(QuicStreamFactory* factory, |
| 76 int yield_after_packets); | 79 int yield_after_packets); |
| 77 | 80 |
| 78 static void SetYieldAfterDuration(QuicStreamFactory* factory, | 81 static void SetYieldAfterDuration(QuicStreamFactory* factory, |
| 79 QuicTime::Delta yield_after_duration); | 82 QuicTime::Delta yield_after_duration); |
| 80 | 83 |
| 81 static size_t GetNumberOfActiveJobs(QuicStreamFactory* factory, | 84 static size_t GetNumberOfActiveJobs(QuicStreamFactory* factory, |
| 82 const QuicServerId& server_id); | 85 const QuicServerId& server_id); |
| 83 | 86 |
| 87 static int GetNumTimeoutsWithOpenStreams(QuicStreamFactory* factory); |
| 88 |
| 89 static int GetNumPublicResetsPostHandshake(QuicStreamFactory* factory); |
| 90 |
| 84 static void MaybeInitialize(QuicStreamFactory* factory); | 91 static void MaybeInitialize(QuicStreamFactory* factory); |
| 85 | 92 |
| 86 static bool HasInitializedData(QuicStreamFactory* factory); | 93 static bool HasInitializedData(QuicStreamFactory* factory); |
| 87 | 94 |
| 88 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, | 95 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, |
| 89 HostPortPair host_port_pair); | 96 HostPortPair host_port_pair); |
| 90 | 97 |
| 91 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, | 98 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, |
| 92 const QuicServerId& quic_server_id); | 99 const QuicServerId& quic_server_id); |
| 93 | 100 |
| 94 // Creates a dummy QUIC server config and caches it. | 101 // Creates a dummy QUIC server config and caches it. |
| 95 static void CacheDummyServerConfig(QuicStreamFactory* factory, | 102 static void CacheDummyServerConfig(QuicStreamFactory* factory, |
| 96 const QuicServerId& quic_server_id); | 103 const QuicServerId& quic_server_id); |
| 97 | 104 |
| 98 static QuicClientPushPromiseIndex* GetPushPromiseIndex( | 105 static QuicClientPushPromiseIndex* GetPushPromiseIndex( |
| 99 QuicStreamFactory* factory); | 106 QuicStreamFactory* factory); |
| 100 | 107 |
| 101 static int GetNumPushStreamsCreated(QuicStreamFactory* factory); | 108 static int GetNumPushStreamsCreated(QuicStreamFactory* factory); |
| 102 | 109 |
| 103 private: | 110 private: |
| 104 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); | 111 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); |
| 105 }; | 112 }; |
| 106 | 113 |
| 107 } // namespace test | 114 } // namespace test |
| 108 } // namespace net | 115 } // namespace net |
| 109 | 116 |
| 110 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ | 117 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ |
| OLD | NEW |