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 #include "net/quic/test_tools/quic_spdy_session_peer.h" | 5 #include "net/quic/test_tools/quic_spdy_session_peer.h" |
6 | 6 |
7 #include "net/quic/core/quic_spdy_session.h" | 7 #include "net/quic/core/quic_spdy_session.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 namespace test { | 10 namespace test { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 QuicSpdySession* session, | 57 QuicSpdySession* session, |
58 QuicStreamId id, | 58 QuicStreamId id, |
59 SpdyHeaderBlock headers, | 59 SpdyHeaderBlock headers, |
60 bool fin, | 60 bool fin, |
61 SpdyPriority priority, | 61 SpdyPriority priority, |
62 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) { | 62 QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) { |
63 return session->WriteHeadersImpl(id, std::move(headers), fin, priority, | 63 return session->WriteHeadersImpl(id, std::move(headers), fin, priority, |
64 std::move(ack_listener)); | 64 std::move(ack_listener)); |
65 } | 65 } |
66 | 66 |
| 67 // static |
| 68 QuicStreamId QuicSpdySessionPeer::NextStreamId(const QuicSpdySession& session) { |
| 69 return 2; |
| 70 } |
| 71 |
| 72 // static |
| 73 QuicStreamId QuicSpdySessionPeer::GetNthClientInitiatedStreamId( |
| 74 const QuicSpdySession& session, |
| 75 int n) { |
| 76 return 5 + QuicSpdySessionPeer::NextStreamId(session) * n; |
| 77 } |
| 78 |
| 79 // static |
| 80 QuicStreamId QuicSpdySessionPeer::GetNthServerInitiatedStreamId( |
| 81 const QuicSpdySession& session, |
| 82 int n) { |
| 83 return 2 + QuicSpdySessionPeer::NextStreamId(session) * n; |
| 84 } |
| 85 |
67 } // namespace test | 86 } // namespace test |
68 } // namespace net | 87 } // namespace net |
OLD | NEW |