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

Side by Side Diff: net/quic/quic_server_session.h

Issue 359653003: Simplify the QuicDispatcher::OnCanWrite logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed wtc's comments in Patch Set 1 Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_dispatcher.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // A server specific QuicSession subclass. 5 // A server specific QuicSession subclass.
6 6
7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_H_ 7 #ifndef NET_QUIC_QUIC_SERVER_SESSION_H_
8 #define NET_QUIC_QUIC_SERVER_SESSION_H_ 8 #define NET_QUIC_QUIC_SERVER_SESSION_H_
9 9
10 #include <set> 10 #include <set>
(...skipping 21 matching lines...) Expand all
32 32
33 // An interface from the session to the entity owning the session. 33 // An interface from the session to the entity owning the session.
34 // This lets the session notify its owner (the Dispatcher) when the connection 34 // This lets the session notify its owner (the Dispatcher) when the connection
35 // is closed or blocked. 35 // is closed or blocked.
36 class QuicServerSessionVisitor { 36 class QuicServerSessionVisitor {
37 public: 37 public:
38 virtual ~QuicServerSessionVisitor() {} 38 virtual ~QuicServerSessionVisitor() {}
39 39
40 virtual void OnConnectionClosed(QuicConnectionId connection_id, 40 virtual void OnConnectionClosed(QuicConnectionId connection_id,
41 QuicErrorCode error) = 0; 41 QuicErrorCode error) = 0;
42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* writer) = 0; 42 virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) = 0;
43 }; 43 };
44 44
45 class QuicServerSession : public QuicSession { 45 class QuicServerSession : public QuicSession {
46 public: 46 public:
47 // Takes ownership of connection_packet_writer 47 // Takes ownership of connection_packet_writer
48 QuicServerSession(const QuicConfig& config, 48 QuicServerSession(const QuicConfig& config,
49 QuicConnection* connection, 49 QuicConnection* connection,
50 QuicPerConnectionPacketWriter* connection_packet_writer, 50 QuicPerConnectionPacketWriter* connection_packet_writer,
51 QuicServerSessionVisitor* visitor); 51 QuicServerSessionVisitor* visitor);
52 52
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 scoped_ptr<QuicCryptoServerStream> crypto_stream_; 85 scoped_ptr<QuicCryptoServerStream> crypto_stream_;
86 scoped_ptr<QuicPerConnectionPacketWriter> connection_packet_writer_; 86 scoped_ptr<QuicPerConnectionPacketWriter> connection_packet_writer_;
87 QuicServerSessionVisitor* visitor_; 87 QuicServerSessionVisitor* visitor_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(QuicServerSession); 89 DISALLOW_COPY_AND_ASSIGN(QuicServerSession);
90 }; 90 };
91 91
92 } // namespace net 92 } // namespace net
93 93
94 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_ 94 #endif // NET_QUIC_QUIC_SERVER_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698