| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | |
| 6 #define NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "base/strings/string_piece.h" | |
| 12 #include "net/quic/core/quic_protocol.h" | |
| 13 #include "net/quic/core/quic_stream_sequencer.h" | |
| 14 | |
| 15 namespace net { | |
| 16 | |
| 17 class ReliableQuicStream; | |
| 18 | |
| 19 namespace test { | |
| 20 | |
| 21 class ReliableQuicStreamPeer { | |
| 22 public: | |
| 23 static void SetWriteSideClosed(bool value, ReliableQuicStream* stream); | |
| 24 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written, | |
| 25 ReliableQuicStream* stream); | |
| 26 static bool read_side_closed(ReliableQuicStream* stream); | |
| 27 static void CloseReadSide(ReliableQuicStream* stream); | |
| 28 | |
| 29 static bool FinSent(ReliableQuicStream* stream); | |
| 30 static bool FinReceived(ReliableQuicStream* stream); | |
| 31 static bool RstSent(ReliableQuicStream* stream); | |
| 32 static bool RstReceived(ReliableQuicStream* stream); | |
| 33 | |
| 34 static bool ReadSideClosed(ReliableQuicStream* stream); | |
| 35 static bool WriteSideClosed(ReliableQuicStream* stream); | |
| 36 | |
| 37 static uint32_t SizeOfQueuedData(ReliableQuicStream* stream); | |
| 38 | |
| 39 static bool StreamContributesToConnectionFlowControl( | |
| 40 ReliableQuicStream* stream); | |
| 41 | |
| 42 static void WriteOrBufferData( | |
| 43 ReliableQuicStream* stream, | |
| 44 base::StringPiece data, | |
| 45 bool fin, | |
| 46 QuicAckListenerInterface* ack_notifier_delegate); | |
| 47 | |
| 48 static net::QuicStreamSequencer* sequencer(ReliableQuicStream* stream); | |
| 49 | |
| 50 private: | |
| 51 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStreamPeer); | |
| 52 }; | |
| 53 | |
| 54 } // namespace test | |
| 55 } // namespace net | |
| 56 | |
| 57 #endif // NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_ | |
| OLD | NEW |