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.
5 #include "net/quic/test_tools/quic_session_peer.h"
7 #include "net/quic/quic_session.h"
8 #include "net/quic/reliable_quic_stream.h"
16 void QuicSessionPeer::SetNextStreamId(QuicSession
* session
, QuicStreamId id
) {
17 session
->next_stream_id_
= id
;
21 void QuicSessionPeer::SetMaxOpenStreams(QuicSession
* session
,
23 session
->max_open_streams_
= max_streams
;
27 QuicCryptoStream
* QuicSessionPeer::GetCryptoStream(QuicSession
* session
) {
28 return session
->GetCryptoStream();
32 QuicHeadersStream
* QuicSessionPeer::GetHeadersStream(QuicSession
* session
) {
33 return session
->headers_stream_
.get();
37 void QuicSessionPeer::SetHeadersStream(QuicSession
* session
,
38 QuicHeadersStream
* headers_stream
) {
39 session
->headers_stream_
.reset(headers_stream
);
43 QuicWriteBlockedList
* QuicSessionPeer::GetWriteBlockedStreams(
44 QuicSession
* session
) {
45 return &session
->write_blocked_streams_
;
49 QuicDataStream
* QuicSessionPeer::GetIncomingDataStream(
51 QuicStreamId stream_id
) {
52 return session
->GetIncomingDataStream(stream_id
);
56 map
<QuicStreamId
, QuicStreamOffset
>&
57 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(QuicSession
* session
) {
58 return session
->locally_closed_streams_highest_offset_
;