Roll src/third_party/WebKit eac3800:0237a66 (svn 202606:202607)
[chromium-blink-merge.git] / net / quic / test_tools / reliable_quic_stream_peer.h
blob7ea7ff3e364ffa4ad34272ce2424e2e799819c08
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.
5 #ifndef NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_
8 #include "base/basictypes.h"
9 #include "base/strings/string_piece.h"
10 #include "net/quic/quic_ack_notifier.h"
11 #include "net/quic/quic_protocol.h"
13 namespace net {
15 class ReliableQuicStream;
17 namespace test {
19 class ReliableQuicStreamPeer {
20 public:
21 static void SetWriteSideClosed(bool value, ReliableQuicStream* stream);
22 static void SetStreamBytesWritten(QuicStreamOffset stream_bytes_written,
23 ReliableQuicStream* stream);
24 static void CloseReadSide(ReliableQuicStream* stream);
26 static bool FinSent(ReliableQuicStream* stream);
27 static bool RstSent(ReliableQuicStream* stream);
29 static uint32 SizeOfQueuedData(ReliableQuicStream* stream);
31 static void SetFecPolicy(ReliableQuicStream* stream, FecPolicy fec_policy);
33 static bool StreamContributesToConnectionFlowControl(
34 ReliableQuicStream* stream);
36 static void WriteOrBufferData(
37 ReliableQuicStream* stream,
38 base::StringPiece data,
39 bool fin,
40 QuicAckNotifier::DelegateInterface* ack_notifier_delegate);
42 private:
43 DISALLOW_COPY_AND_ASSIGN(ReliableQuicStreamPeer);
46 } // namespace test
47 } // namespace net
49 #endif // NET_QUIC_TEST_TOOLS_RELIABLE_QUIC_STREAM_PEER_H_