| 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 "net/quic/core/quic_session.h" | 7 #include "net/quic/core/quic_session.h" |
| 8 #include "net/quic/core/quic_stream.h" | 8 #include "net/quic/core/quic_stream.h" |
| 9 #include "net/quic/platform/api/quic_map_util.h" | 9 #include "net/quic/platform/api/quic_map_util.h" |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return session->static_streams(); | 64 return session->static_streams(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // static | 67 // static |
| 68 QuicSession::DynamicStreamMap& QuicSessionPeer::dynamic_streams( | 68 QuicSession::DynamicStreamMap& QuicSessionPeer::dynamic_streams( |
| 69 QuicSession* session) { | 69 QuicSession* session) { |
| 70 return session->dynamic_streams(); | 70 return session->dynamic_streams(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 // static | 73 // static |
| 74 const QuicSession::ClosedStreams& QuicSessionPeer::closed_streams( |
| 75 QuicSession* session) { |
| 76 return *session->closed_streams(); |
| 77 } |
| 78 |
| 79 // static |
| 80 const QuicSession::ZombieStreamMap& QuicSessionPeer::zombie_streams( |
| 81 QuicSession* session) { |
| 82 return session->zombie_streams(); |
| 83 } |
| 84 |
| 85 // static |
| 74 std::unordered_set<QuicStreamId>* QuicSessionPeer::GetDrainingStreams( | 86 std::unordered_set<QuicStreamId>* QuicSessionPeer::GetDrainingStreams( |
| 75 QuicSession* session) { | 87 QuicSession* session) { |
| 76 return &session->draining_streams_; | 88 return &session->draining_streams_; |
| 77 } | 89 } |
| 78 | 90 |
| 79 // static | 91 // static |
| 80 void QuicSessionPeer::ActivateStream(QuicSession* session, | 92 void QuicSessionPeer::ActivateStream(QuicSession* session, |
| 81 std::unique_ptr<QuicStream> stream) { | 93 std::unique_ptr<QuicStream> stream) { |
| 82 return session->ActivateStream(std::move(stream)); | 94 return session->ActivateStream(std::move(stream)); |
| 83 } | 95 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 107 // locally-created stream. | 119 // locally-created stream. |
| 108 return id >= session->next_outgoing_stream_id_; | 120 return id >= session->next_outgoing_stream_id_; |
| 109 } else { | 121 } else { |
| 110 // peer-created stream. | 122 // peer-created stream. |
| 111 return id > session->largest_peer_created_stream_id_; | 123 return id > session->largest_peer_created_stream_id_; |
| 112 } | 124 } |
| 113 } | 125 } |
| 114 | 126 |
| 115 } // namespace test | 127 } // namespace test |
| 116 } // namespace net | 128 } // namespace net |
| OLD | NEW |