Delete unused downloads page asset.
[chromium-blink-merge.git] / net / quic / test_tools / quic_session_peer.h
blob9f4f01109018a080dfd2c2649f31f521a5f891a9
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_QUIC_SESSION_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
8 #include <map>
10 #include "base/containers/hash_tables.h"
11 #include "net/quic/quic_protocol.h"
12 #include "net/quic/quic_write_blocked_list.h"
14 namespace net {
16 class QuicCryptoStream;
17 class QuicDataStream;
18 class QuicHeadersStream;
19 class QuicSession;
20 class ReliableQuicStream;
22 namespace test {
24 class QuicSessionPeer {
25 public:
26 static void SetNextStreamId(QuicSession* session, QuicStreamId id);
27 static void SetMaxOpenStreams(QuicSession* session, uint32 max_streams);
28 static QuicCryptoStream* GetCryptoStream(QuicSession* session);
29 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session);
30 static ReliableQuicStream* GetIncomingDynamicStream(QuicSession* session,
31 QuicStreamId stream_id);
32 static std::map<QuicStreamId, QuicStreamOffset>&
33 GetLocallyClosedStreamsHighestOffset(QuicSession* session);
34 static base::hash_set<QuicStreamId>* GetDrainingStreams(QuicSession* session);
36 // Discern the state of a stream. Exactly one of these should be true at a
37 // time for any stream id > 0 (other than the special streams 1 and 3).
38 static bool IsStreamClosed(QuicSession* session, QuicStreamId id);
39 static bool IsStreamCreated(QuicSession* session, QuicStreamId id);
40 static bool IsStreamImplicitlyCreated(QuicSession* session, QuicStreamId id);
41 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id);
43 private:
44 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer);
47 } // namespace test
49 } // namespace net
51 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_