OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_SPDY_SESSION_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/quic/core/quic_packets.h" | 9 #include "net/quic/core/quic_packets.h" |
10 #include "net/quic/core/quic_write_blocked_list.h" | 10 #include "net/quic/core/quic_write_blocked_list.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 static void SetMaxUncompressedHeaderBytes( | 34 static void SetMaxUncompressedHeaderBytes( |
35 QuicSpdySession* session, | 35 QuicSpdySession* session, |
36 size_t set_max_uncompressed_header_bytes); | 36 size_t set_max_uncompressed_header_bytes); |
37 static size_t WriteHeadersImpl( | 37 static size_t WriteHeadersImpl( |
38 QuicSpdySession* session, | 38 QuicSpdySession* session, |
39 QuicStreamId id, | 39 QuicStreamId id, |
40 SpdyHeaderBlock headers, | 40 SpdyHeaderBlock headers, |
41 bool fin, | 41 bool fin, |
42 SpdyPriority priority, | 42 SpdyPriority priority, |
43 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); | 43 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener); |
44 // Helper functions for stream ids, to allow test logic to abstract | |
45 // over the HTTP stream numbering scheme (i.e. whether one or | |
46 // two QUIC streams are used per HTTP transaction). | |
47 static QuicStreamId NextStreamId(const QuicSpdySession& session); | |
48 // n should start at 0. | |
49 static QuicStreamId GetNthClientInitiatedStreamId( | |
50 const QuicSpdySession& session, | |
51 int n); | |
52 // n should start at 0. | |
53 static QuicStreamId GetNthServerInitiatedStreamId( | |
54 const QuicSpdySession& session, | |
55 int n); | |
56 | 44 |
57 private: | 45 private: |
58 DISALLOW_COPY_AND_ASSIGN(QuicSpdySessionPeer); | 46 DISALLOW_COPY_AND_ASSIGN(QuicSpdySessionPeer); |
59 }; | 47 }; |
60 | 48 |
61 } // namespace test | 49 } // namespace test |
62 | 50 |
63 } // namespace net | 51 } // namespace net |
64 | 52 |
65 #endif // NET_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ | 53 #endif // NET_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_ |
OLD | NEW |