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 | |
60 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); | 57 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); |
61 | 58 |
62 static bool IsQuicDisabled(QuicStreamFactory* factory, uint16_t port); | 59 static bool IsQuicDisabled(QuicStreamFactory* factory); |
63 | 60 |
64 static bool GetDelayTcpRace(QuicStreamFactory* factory); | 61 static bool GetDelayTcpRace(QuicStreamFactory* factory); |
65 | 62 |
66 static void SetDelayTcpRace(QuicStreamFactory* factory, bool delay_tcp_race); | 63 static void SetDelayTcpRace(QuicStreamFactory* factory, bool delay_tcp_race); |
67 | 64 |
68 static bool GetRaceCertVerification(QuicStreamFactory* factory); | 65 static bool GetRaceCertVerification(QuicStreamFactory* factory); |
69 | 66 |
70 static void SetRaceCertVerification(QuicStreamFactory* factory, | 67 static void SetRaceCertVerification(QuicStreamFactory* factory, |
71 bool race_cert_verification); | 68 bool race_cert_verification); |
72 | 69 |
73 static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory, | 70 static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory, |
74 const QuicServerId& server_id, | 71 const QuicServerId& server_id, |
75 int cert_verify_flags, | 72 int cert_verify_flags, |
76 const BoundNetLog& net_log); | 73 const BoundNetLog& net_log); |
77 | 74 |
78 static void SetYieldAfterPackets(QuicStreamFactory* factory, | 75 static void SetYieldAfterPackets(QuicStreamFactory* factory, |
79 int yield_after_packets); | 76 int yield_after_packets); |
80 | 77 |
81 static void SetYieldAfterDuration(QuicStreamFactory* factory, | 78 static void SetYieldAfterDuration(QuicStreamFactory* factory, |
82 QuicTime::Delta yield_after_duration); | 79 QuicTime::Delta yield_after_duration); |
83 | 80 |
84 static size_t GetNumberOfActiveJobs(QuicStreamFactory* factory, | 81 static size_t GetNumberOfActiveJobs(QuicStreamFactory* factory, |
85 const QuicServerId& server_id); | 82 const QuicServerId& server_id); |
86 | 83 |
87 static int GetNumTimeoutsWithOpenStreams(QuicStreamFactory* factory); | |
88 | |
89 static int GetNumPublicResetsPostHandshake(QuicStreamFactory* factory); | |
90 | |
91 static void MaybeInitialize(QuicStreamFactory* factory); | 84 static void MaybeInitialize(QuicStreamFactory* factory); |
92 | 85 |
93 static bool HasInitializedData(QuicStreamFactory* factory); | 86 static bool HasInitializedData(QuicStreamFactory* factory); |
94 | 87 |
95 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, | 88 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, |
96 HostPortPair host_port_pair); | 89 HostPortPair host_port_pair); |
97 | 90 |
98 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, | 91 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, |
99 const QuicServerId& quic_server_id); | 92 const QuicServerId& quic_server_id); |
100 | 93 |
101 // Creates a dummy QUIC server config and caches it. | 94 // Creates a dummy QUIC server config and caches it. |
102 static void CacheDummyServerConfig(QuicStreamFactory* factory, | 95 static void CacheDummyServerConfig(QuicStreamFactory* factory, |
103 const QuicServerId& quic_server_id); | 96 const QuicServerId& quic_server_id); |
104 | 97 |
105 static QuicClientPushPromiseIndex* GetPushPromiseIndex( | 98 static QuicClientPushPromiseIndex* GetPushPromiseIndex( |
106 QuicStreamFactory* factory); | 99 QuicStreamFactory* factory); |
107 | 100 |
108 static int GetNumPushStreamsCreated(QuicStreamFactory* factory); | 101 static int GetNumPushStreamsCreated(QuicStreamFactory* factory); |
109 | 102 |
110 private: | 103 private: |
111 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); | 104 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); |
112 }; | 105 }; |
113 | 106 |
114 } // namespace test | 107 } // namespace test |
115 } // namespace net | 108 } // namespace net |
116 | 109 |
117 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ | 110 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ |
OLD | NEW |