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

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

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 years, 8 months 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/test_tools/quic_connection_peer.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 <cstdint> 8 #include <cstdint>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 12 matching lines...) Expand all
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 SetMaxOpenIncomingStreams(QuicSession* session, 29 static void SetMaxOpenIncomingStreams(QuicSession* session,
30 uint32_t max_streams); 30 uint32_t max_streams);
31 static void SetMaxOpenOutgoingStreams(QuicSession* session, 31 static void SetMaxOpenOutgoingStreams(QuicSession* session,
32 uint32_t max_streams); 32 uint32_t max_streams);
33 static QuicCryptoStream* GetCryptoStream(QuicSession* session); 33 static QuicCryptoStream* GetMutableCryptoStream(QuicSession* session);
34 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session); 34 static QuicWriteBlockedList* GetWriteBlockedStreams(QuicSession* session);
35 static QuicStream* GetOrCreateDynamicStream(QuicSession* session, 35 static QuicStream* GetOrCreateDynamicStream(QuicSession* session,
36 QuicStreamId stream_id); 36 QuicStreamId stream_id);
37 static std::map<QuicStreamId, QuicStreamOffset>& 37 static std::map<QuicStreamId, QuicStreamOffset>&
38 GetLocallyClosedStreamsHighestOffset(QuicSession* session); 38 GetLocallyClosedStreamsHighestOffset(QuicSession* session);
39 static QuicSession::StaticStreamMap& static_streams(QuicSession* session); 39 static QuicSession::StaticStreamMap& static_streams(QuicSession* session);
40 static QuicSession::DynamicStreamMap& dynamic_streams(QuicSession* session); 40 static QuicSession::DynamicStreamMap& dynamic_streams(QuicSession* session);
41 static std::unordered_set<QuicStreamId>* GetDrainingStreams( 41 static std::unordered_set<QuicStreamId>* GetDrainingStreams(
42 QuicSession* session); 42 QuicSession* session);
43 static void ActivateStream(QuicSession* session, 43 static void ActivateStream(QuicSession* session,
44 std::unique_ptr<QuicStream> stream); 44 std::unique_ptr<QuicStream> stream);
45 45
46 // Discern the state of a stream. Exactly one of these should be true at a 46 // Discern the state of a stream. Exactly one of these should be true at a
47 // time for any stream id > 0 (other than the special streams 1 and 3). 47 // time for any stream id > 0 (other than the special streams 1 and 3).
48 static bool IsStreamClosed(QuicSession* session, QuicStreamId id); 48 static bool IsStreamClosed(QuicSession* session, QuicStreamId id);
49 static bool IsStreamCreated(QuicSession* session, QuicStreamId id); 49 static bool IsStreamCreated(QuicSession* session, QuicStreamId id);
50 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id); 50 static bool IsStreamAvailable(QuicSession* session, QuicStreamId id);
51 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id); 51 static bool IsStreamUncreated(QuicSession* session, QuicStreamId id);
52 52
53 private: 53 private:
54 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer); 54 DISALLOW_COPY_AND_ASSIGN(QuicSessionPeer);
55 }; 55 };
56 56
57 } // namespace test 57 } // namespace test
58 58
59 } // namespace net 59 } // namespace net
60 60
61 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_ 61 #endif // NET_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_connection_peer.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