Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: net/quic/test_tools/quic_spdy_session_peer.cc

Issue 2862563003: Landing Recent QUIC changes until Sat Apr 29 00:22:04 2017 +0000 (Closed)
Patch Set: rebase and fix test bugs detected by swarm bot. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/test_tools/quic_spdy_session_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_spdy_session_peer.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698