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_CHROMIUM_QUIC_STREAM_FACTORY_PEER_H_ | 5 #ifndef NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_PEER_H_ |
6 #define NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_PEER_H_ | 6 #define NET_QUIC_CHROMIUM_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/core/quic_packets.h" | 15 #include "net/quic/core/quic_packets.h" |
16 #include "net/quic/core/quic_server_id.h" | 16 #include "net/quic/core/quic_server_id.h" |
17 #include "net/quic/core/quic_time.h" | 17 #include "net/quic/core/quic_time.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 class NetLogWithSource; | 21 class NetLogWithSource; |
22 class QuicAlarmFactory; | 22 class QuicAlarmFactory; |
23 class QuicChromiumClientSession; | 23 class QuicChromiumClientSession; |
24 class QuicClientPushPromiseIndex; | 24 class QuicClientPushPromiseIndex; |
25 class QuicConfig; | 25 class QuicConfig; |
26 class QuicCryptoClientConfig; | 26 class QuicCryptoClientConfig; |
27 class QuicHttpStream; | |
28 class QuicStreamFactory; | 27 class QuicStreamFactory; |
29 | 28 |
30 namespace test { | 29 namespace test { |
31 | 30 |
32 class QuicStreamFactoryPeer { | 31 class QuicStreamFactoryPeer { |
33 public: | 32 public: |
34 static const QuicConfig* GetConfig(QuicStreamFactory* factory); | 33 static const QuicConfig* GetConfig(QuicStreamFactory* factory); |
35 | 34 |
36 static QuicCryptoClientConfig* GetCryptoConfig(QuicStreamFactory* factory); | 35 static QuicCryptoClientConfig* GetCryptoConfig(QuicStreamFactory* factory); |
37 | 36 |
38 static bool HasActiveSession(QuicStreamFactory* factory, | 37 static bool HasActiveSession(QuicStreamFactory* factory, |
39 const QuicServerId& server_id); | 38 const QuicServerId& server_id); |
40 | 39 |
41 static bool HasActiveJob(QuicStreamFactory* factory, | 40 static bool HasActiveJob(QuicStreamFactory* factory, |
42 const QuicServerId& server_id); | 41 const QuicServerId& server_id); |
43 | 42 |
44 static bool HasActiveCertVerifierJob(QuicStreamFactory* factory, | 43 static bool HasActiveCertVerifierJob(QuicStreamFactory* factory, |
45 const QuicServerId& server_id); | 44 const QuicServerId& server_id); |
46 | 45 |
47 static QuicChromiumClientSession* GetActiveSession( | 46 static QuicChromiumClientSession* GetActiveSession( |
48 QuicStreamFactory* factory, | 47 QuicStreamFactory* factory, |
49 const QuicServerId& server_id); | 48 const QuicServerId& server_id); |
50 | 49 |
51 static std::unique_ptr<QuicHttpStream> CreateFromSession( | |
52 QuicStreamFactory* factory, | |
53 QuicChromiumClientSession* session); | |
54 | |
55 static bool IsLiveSession(QuicStreamFactory* factory, | 50 static bool IsLiveSession(QuicStreamFactory* factory, |
56 QuicChromiumClientSession* session); | 51 QuicChromiumClientSession* session); |
57 | 52 |
58 static void SetTaskRunner(QuicStreamFactory* factory, | 53 static void SetTaskRunner(QuicStreamFactory* factory, |
59 base::TaskRunner* task_runner); | 54 base::TaskRunner* task_runner); |
60 | 55 |
61 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); | 56 static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory); |
62 | 57 |
63 static bool GetRaceCertVerification(QuicStreamFactory* factory); | 58 static bool GetRaceCertVerification(QuicStreamFactory* factory); |
64 | 59 |
(...skipping 30 matching lines...) Expand all Loading... |
95 std::unique_ptr<QuicAlarmFactory> alarm_factory); | 90 std::unique_ptr<QuicAlarmFactory> alarm_factory); |
96 | 91 |
97 private: | 92 private: |
98 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); | 93 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer); |
99 }; | 94 }; |
100 | 95 |
101 } // namespace test | 96 } // namespace test |
102 } // namespace net | 97 } // namespace net |
103 | 98 |
104 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_PEER_H_ | 99 #endif // NET_QUIC_CHROMIUM_QUIC_STREAM_FACTORY_PEER_H_ |
OLD | NEW |