Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: net/quic/test_tools/quic_session_peer.h

Issue 1422533006: Merge GetIncomingDynamicStream and GetDynamicStream into a single GetOrCreateDynamicStream method i… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@106419223
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/test_tools/quic_session_peer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_QUIC_SESSION_PEER_H_ 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ 6 #define NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 11 matching lines...) Expand all
22 22
23 namespace test { 23 namespace test {
24 24
25 class QuicSessionPeer { 25 class QuicSessionPeer {
26 public: 26 public:
27 static QuicStreamId GetNextOutgoingStreamId(QuicSession* session); 27 static QuicStreamId GetNextOutgoingStreamId(QuicSession* session);
28 static void SetNextOutgoingStreamId(QuicSession* session, QuicStreamId id); 28 static void SetNextOutgoingStreamId(QuicSession* session, QuicStreamId id);
29 static void SetMaxOpenStreams(QuicSession* session, uint32 max_streams); 29 static void SetMaxOpenStreams(QuicSession* session, uint32 max_streams);
30 static QuicCryptoStream* GetCryptoStream(QuicSession* session); 30 static QuicCryptoStream* GetCryptoStream(QuicSession* session);
31 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session); 31 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session);
32 static ReliableQuicStream* GetIncomingDynamicStream(QuicSession* session, 32 static ReliableQuicStream* GetOrCreateDynamicStream(QuicSession* session,
33 QuicStreamId stream_id); 33 QuicStreamId stream_id);
34 static std::map<QuicStreamId, QuicStreamOffset>& 34 static std::map<QuicStreamId, QuicStreamOffset>&
35 GetLocallyClosedStreamsHighestOffset(QuicSession* session); 35 GetLocallyClosedStreamsHighestOffset(QuicSession* session);
36 static QuicSession::StreamMap& static_streams(QuicSession* session); 36 static QuicSession::StreamMap& static_streams(QuicSession* session);
37 static QuicSession::StreamMap& dynamic_streams(QuicSession* session); 37 static QuicSession::StreamMap& dynamic_streams(QuicSession* session);
38 static base::hash_set<QuicStreamId>* GetDrainingStreams(QuicSession* session); 38 static base::hash_set<QuicStreamId>* GetDrainingStreams(QuicSession* session);
39 39
40 // Discern the state of a stream. Exactly one of these should be true at a 40 // Discern the state of a stream. Exactly one of these should be true at a
41 // time for any stream id > 0 (other than the special streams 1 and 3). 41 // time for any stream id > 0 (other than the special streams 1 and 3).
42 static bool IsStreamClosed(QuicSession* session, QuicStreamId id); 42 static bool IsStreamClosed(QuicSession* session, QuicStreamId id);
43 static bool IsStreamCreated(QuicSession* session, QuicStreamId id); 43 static bool IsStreamCreated(QuicSession* session, QuicStreamId id);
44 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id); 44 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id);
45 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id); 45 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id);
46 46
47 private: 47 private:
48 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer); 48 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer);
49 }; 49 };
50 50
51 } // namespace test 51 } // namespace test
52 52
53 } // namespace net 53 } // namespace net
54 54
55 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ 55 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_spdy_session.cc ('k') | net/quic/test_tools/quic_session_peer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698