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 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/task_runner.h" | 12 #include "base/task_runner.h" |
13 #include "net/base/host_port_pair.h" | 13 #include "net/base/host_port_pair.h" |
14 #include "net/base/privacy_mode.h" | 14 #include "net/base/privacy_mode.h" |
15 #include "net/quic/quic_protocol.h" | 15 #include "net/quic/quic_protocol.h" |
16 #include "net/quic/quic_server_id.h" | 16 #include "net/quic/quic_server_id.h" |
17 #include "net/quic/quic_time.h" | 17 #include "net/quic/quic_time.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 class QuicConfig; | 21 class QuicConfig; |
22 class QuicCryptoClientConfig; | 22 class QuicCryptoClientConfig; |
23 class QuicHttpStream; | 23 class QuicHttpStream; |
24 class QuicStreamFactory; | 24 class QuicStreamFactory; |
25 class QuicChromiumClientSession; | 25 class QuicChromiumClientSession; |
| 26 class QuicClientPushPromiseIndex; |
26 | 27 |
27 namespace test { | 28 namespace test { |
28 | 29 |
29 class QuicStreamFactoryPeer { | 30 class QuicStreamFactoryPeer { |
30 public: | 31 public: |
31 static const QuicConfig* GetConfig(QuicStreamFactory* factory); | 32 static const QuicConfig* GetConfig(QuicStreamFactory* factory); |
32 | 33 |
33 static QuicCryptoClientConfig* GetCryptoConfig(QuicStreamFactory* factory); | 34 static QuicCryptoClientConfig* GetCryptoConfig(QuicStreamFactory* factory); |
34 | 35 |
35 static bool HasActiveSession(QuicStreamFactory* factory, | 36 static bool HasActiveSession(QuicStreamFactory* factory, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, | 79 static bool SupportsQuicAtStartUp(QuicStreamFactory* factory, |
79 HostPortPair host_port_pair); | 80 HostPortPair host_port_pair); |
80 | 81 |
81 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, | 82 static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory, |
82 QuicServerId& quic_server_id); | 83 QuicServerId& quic_server_id); |
83 | 84 |
84 // Creates a dummy QUIC server config and caches it. | 85 // Creates a dummy QUIC server config and caches it. |
85 static void CacheDummyServerConfig(QuicStreamFactory* factory, | 86 static void CacheDummyServerConfig(QuicStreamFactory* factory, |
86 const QuicServerId& quic_server_id); | 87 const QuicServerId& quic_server_id); |
87 | 88 |
| 89 static QuicClientPushPromiseIndex* GetPushPromiseIndex( |
| 90 QuicStreamFactory* factory); |
| 91 |
| 92 static int GetNumPushStreamsCreated(QuicStreamFactory* factory); |
| 93 |
88 private: | 94 private: |
89 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); | 95 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); |
90 }; | 96 }; |
91 | 97 |
92 } // namespace test | 98 } // namespace test |
93 } // namespace net | 99 } // namespace net |
94 | 100 |
95 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ | 101 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_FACTORY_PEER_H_ |
OLD | NEW |