| 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 #ifndef NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | 6 #define NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "net/quic/quic_protocol.h" | 9 #include "net/quic/quic_protocol.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 class ReliableQuicStream; | 13 class ReliableQuicStream; |
| 14 | 14 |
| 15 namespace test { | 15 namespace test { |
| 16 | 16 |
| 17 class ReliableQuicStreamPeer { | 17 class ReliableQuicStreamPeer { |
| 18 public: | 18 public: |
| 19 static void SetWriteSideClosed(bool value, ReliableQuicStream* stream); | 19 static void SetWriteSideClosed(bool value, ReliableQuicStream* stream); |
| 20 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written, | 20 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written, |
| 21 ReliableQuicStream* stream); | 21 ReliableQuicStream* stream); |
| 22 static void CloseReadSide(ReliableQuicStream* stream); | 22 static void CloseReadSide(ReliableQuicStream* stream); |
| 23 | 23 |
| 24 static bool FinSent(ReliableQuicStream* stream); | 24 static bool FinSent(ReliableQuicStream* stream); |
| 25 static bool RstSent(ReliableQuicStream* stream); | 25 static bool RstSent(ReliableQuicStream* stream); |
| 26 | 26 |
| 27 static void SetFlowControlSendOffset(ReliableQuicStream* stream, | |
| 28 QuicStreamOffset offset); | |
| 29 static void SetFlowControlReceiveOffset(ReliableQuicStream* stream, | |
| 30 QuicStreamOffset offset); | |
| 31 static void SetFlowControlMaxReceiveWindow(ReliableQuicStream* stream, | |
| 32 uint64 window_size); | |
| 33 static QuicStreamOffset SendWindowOffset(ReliableQuicStream* stream); | |
| 34 static uint64 SendWindowSize(ReliableQuicStream* stream); | |
| 35 static QuicStreamOffset ReceiveWindowOffset(ReliableQuicStream* stream); | |
| 36 static uint64 ReceiveWindowSize(ReliableQuicStream* stream); | |
| 37 | |
| 38 static uint32 SizeOfQueuedData(ReliableQuicStream* stream); | 27 static uint32 SizeOfQueuedData(ReliableQuicStream* stream); |
| 39 | 28 |
| 40 private: | 29 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStreamPeer); | 30 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStreamPeer); |
| 42 }; | 31 }; |
| 43 | 32 |
| 44 } // namespace test | 33 } // namespace test |
| 45 } // namespace net | 34 } // namespace net |
| 46 | 35 |
| 47 #endif // NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | 36 #endif // NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ |
| OLD | NEW |