| 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_QUIC_STREAM_PEER_H_ |
| 6 #define NET_QUIC_TEST_TOOLS_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 QuicStream; |
| 18 |
| 19 namespace test { |
| 20 |
| 21 class QuicStreamPeer { |
| 22 public: |
| 23 static void SetWriteSideClosed(bool value, QuicStream* stream); |
| 24 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written, |
| 25 QuicStream* stream); |
| 26 static bool read_side_closed(QuicStream* stream); |
| 27 static void CloseReadSide(QuicStream* stream); |
| 28 |
| 29 static bool FinSent(QuicStream* stream); |
| 30 static bool FinReceived(QuicStream* stream); |
| 31 static bool RstSent(QuicStream* stream); |
| 32 static bool RstReceived(QuicStream* stream); |
| 33 |
| 34 static bool ReadSideClosed(QuicStream* stream); |
| 35 static bool WriteSideClosed(QuicStream* stream); |
| 36 |
| 37 static uint32_t SizeOfQueuedData(QuicStream* stream); |
| 38 |
| 39 static bool StreamContributesToConnectionFlowControl(QuicStream* stream); |
| 40 |
| 41 static void WriteOrBufferData( |
| 42 QuicStream* stream, |
| 43 base::StringPiece data, |
| 44 bool fin, |
| 45 QuicAckListenerInterface* ack_notifier_delegate); |
| 46 |
| 47 static net::QuicStreamSequencer* sequencer(QuicStream* stream); |
| 48 |
| 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(QuicStreamPeer); |
| 51 }; |
| 52 |
| 53 } // namespace test |
| 54 } // namespace net |
| 55 |
| 56 #endif // NET_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_ |
| OLD | NEW |