| 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_stream_peer.h" | 5 #include "net/quic/test_tools/quic_stream_peer.h" |
| 6 | 6 |
| 7 #include <list> | 7 #include <list> |
| 8 | 8 |
| 9 #include "net/quic/core/quic_stream.h" | 9 #include "net/quic/core/quic_stream.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 void QuicStreamPeer::CloseReadSide(QuicStream* stream) { | 34 void QuicStreamPeer::CloseReadSide(QuicStream* stream) { |
| 35 stream->CloseReadSide(); | 35 stream->CloseReadSide(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 bool QuicStreamPeer::FinSent(QuicStream* stream) { | 39 bool QuicStreamPeer::FinSent(QuicStream* stream) { |
| 40 return stream->fin_sent_; | 40 return stream->fin_sent_; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // static | 43 // static |
| 44 bool QuicStreamPeer::FinReceived(QuicStream* stream) { | |
| 45 return stream->fin_received_; | |
| 46 } | |
| 47 | |
| 48 // static | |
| 49 bool QuicStreamPeer::RstSent(QuicStream* stream) { | 44 bool QuicStreamPeer::RstSent(QuicStream* stream) { |
| 50 return stream->rst_sent_; | 45 return stream->rst_sent_; |
| 51 } | 46 } |
| 52 | 47 |
| 53 // static | 48 // static |
| 54 bool QuicStreamPeer::RstReceived(QuicStream* stream) { | |
| 55 return stream->rst_received_; | |
| 56 } | |
| 57 | |
| 58 // static | |
| 59 bool QuicStreamPeer::ReadSideClosed(QuicStream* stream) { | |
| 60 return stream->read_side_closed_; | |
| 61 } | |
| 62 | |
| 63 // static | |
| 64 bool QuicStreamPeer::WriteSideClosed(QuicStream* stream) { | |
| 65 return stream->write_side_closed_; | |
| 66 } | |
| 67 | |
| 68 // static | |
| 69 uint32_t QuicStreamPeer::SizeOfQueuedData(QuicStream* stream) { | 49 uint32_t QuicStreamPeer::SizeOfQueuedData(QuicStream* stream) { |
| 70 uint32_t total = 0; | 50 uint32_t total = 0; |
| 71 std::list<QuicStream::PendingData>::iterator it = | 51 std::list<QuicStream::PendingData>::iterator it = |
| 72 stream->queued_data_.begin(); | 52 stream->queued_data_.begin(); |
| 73 while (it != stream->queued_data_.end()) { | 53 while (it != stream->queued_data_.end()) { |
| 74 total += it->data.size(); | 54 total += it->data.size(); |
| 75 ++it; | 55 ++it; |
| 76 } | 56 } |
| 77 return total; | 57 return total; |
| 78 } | 58 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 97 return &(stream->sequencer_); | 77 return &(stream->sequencer_); |
| 98 } | 78 } |
| 99 | 79 |
| 100 // static | 80 // static |
| 101 QuicSession* QuicStreamPeer::session(QuicStream* stream) { | 81 QuicSession* QuicStreamPeer::session(QuicStream* stream) { |
| 102 return stream->session(); | 82 return stream->session(); |
| 103 } | 83 } |
| 104 | 84 |
| 105 } // namespace test | 85 } // namespace test |
| 106 } // namespace net | 86 } // namespace net |
| OLD | NEW |