| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "net/quic/test_tools/quic_session_peer.h" | |
| 6 | |
| 7 #include "net/quic/quic_session.h" | |
| 8 #include "net/quic/reliable_quic_stream.h" | |
| 9 | |
| 10 using std::map; | |
| 11 | |
| 12 namespace net { | |
| 13 namespace test { | |
| 14 | |
| 15 // static | |
| 16 void QuicSessionPeer::SetNextStreamId(QuicSession* session, QuicStreamId id) { | |
| 17 session->next_stream_id_ = id; | |
| 18 } | |
| 19 | |
| 20 // static | |
| 21 void QuicSessionPeer::SetMaxOpenStreams(QuicSession* session, | |
| 22 uint32 max_streams) { | |
| 23 session->max_open_streams_ = max_streams; | |
| 24 } | |
| 25 | |
| 26 // static | |
| 27 QuicCryptoStream* QuicSessionPeer::GetCryptoStream(QuicSession* session) { | |
| 28 return session->GetCryptoStream(); | |
| 29 } | |
| 30 | |
| 31 // static | |
| 32 QuicHeadersStream* QuicSessionPeer::GetHeadersStream(QuicSession* session) { | |
| 33 return session->headers_stream_.get(); | |
| 34 } | |
| 35 | |
| 36 // static | |
| 37 void QuicSessionPeer::SetHeadersStream(QuicSession* session, | |
| 38 QuicHeadersStream* headers_stream) { | |
| 39 session->headers_stream_.reset(headers_stream); | |
| 40 } | |
| 41 | |
| 42 // static | |
| 43 QuicWriteBlockedList* QuicSessionPeer::GetWriteBlockedStreams( | |
| 44 QuicSession* session) { | |
| 45 return &session->write_blocked_streams_; | |
| 46 } | |
| 47 | |
| 48 // static | |
| 49 QuicDataStream* QuicSessionPeer::GetIncomingDataStream( | |
| 50 QuicSession* session, | |
| 51 QuicStreamId stream_id) { | |
| 52 return session->GetIncomingDataStream(stream_id); | |
| 53 } | |
| 54 | |
| 55 // static | |
| 56 map<QuicStreamId, QuicStreamOffset>& | |
| 57 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(QuicSession* session) { | |
| 58 return session->locally_closed_streams_highest_offset_; | |
| 59 } | |
| 60 | |
| 61 } // namespace test | |
| 62 } // namespace net | |
| OLD | NEW |