| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_session_peer.h" | 5 #include "net/quic/test_tools/quic_session_peer.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "net/quic/quic_session.h" | 8 #include "net/quic/quic_session.h" |
| 9 #include "net/quic/reliable_quic_stream.h" | 9 #include "net/quic/reliable_quic_stream.h" |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 return session->GetCryptoStream(); | 35 return session->GetCryptoStream(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 QuicWriteBlockedList* QuicSessionPeer::GetWriteBlockedStreams( | 39 QuicWriteBlockedList* QuicSessionPeer::GetWriteBlockedStreams( |
| 40 QuicSession* session) { | 40 QuicSession* session) { |
| 41 return &session->write_blocked_streams_; | 41 return &session->write_blocked_streams_; |
| 42 } | 42 } |
| 43 | 43 |
| 44 // static | 44 // static |
| 45 ReliableQuicStream* QuicSessionPeer::GetIncomingDynamicStream( | 45 ReliableQuicStream* QuicSessionPeer::GetOrCreateDynamicStream( |
| 46 QuicSession* session, | 46 QuicSession* session, QuicStreamId stream_id) { |
| 47 QuicStreamId stream_id) { | 47 return session->GetOrCreateDynamicStream(stream_id); |
| 48 return session->GetIncomingDynamicStream(stream_id); | |
| 49 } | 48 } |
| 50 | 49 |
| 51 // static | 50 // static |
| 52 map<QuicStreamId, QuicStreamOffset>& | 51 map<QuicStreamId, QuicStreamOffset>& |
| 53 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(QuicSession* session) { | 52 QuicSessionPeer::GetLocallyClosedStreamsHighestOffset(QuicSession* session) { |
| 54 return session->locally_closed_streams_highest_offset_; | 53 return session->locally_closed_streams_highest_offset_; |
| 55 } | 54 } |
| 56 | 55 |
| 57 // static | 56 // static |
| 58 QuicSession::StreamMap& QuicSessionPeer::static_streams(QuicSession* session) { | 57 QuicSession::StreamMap& QuicSessionPeer::static_streams(QuicSession* session) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // locally-created stream. | 94 // locally-created stream. |
| 96 return id >= session->next_outgoing_stream_id_; | 95 return id >= session->next_outgoing_stream_id_; |
| 97 } else { | 96 } else { |
| 98 // peer-created stream. | 97 // peer-created stream. |
| 99 return id > session->largest_peer_created_stream_id_; | 98 return id > session->largest_peer_created_stream_id_; |
| 100 } | 99 } |
| 101 } | 100 } |
| 102 | 101 |
| 103 } // namespace test | 102 } // namespace test |
| 104 } // namespace net | 103 } // namespace net |
| OLD | NEW |