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

Unified Diff: net/quic/quic_connection.h

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.h
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 8c6d2ca923a65271980d1b39916b15da329a26a2..a7e8a7e0f89c6cd19ec720023e10117046bfff71 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -223,11 +223,13 @@ class NET_EXPORT_PRIVATE QuicConnection
};
// Constructs a new QuicConnection for |connection_id| and |address|.
- // |helper| and |writer| must outlive this connection.
+ // |helper| must outlive this connection, and if |owns_writer| is false, so
+ // must |writer|.
QuicConnection(QuicConnectionId connection_id,
IPEndPoint address,
QuicConnectionHelperInterface* helper,
QuicPacketWriter* writer,
+ bool owns_writer,
bool is_server,
const QuicVersionVector& supported_versions);
virtual ~QuicConnection();
@@ -303,11 +305,6 @@ class NET_EXPORT_PRIVATE QuicConnection
// If the socket is not blocked, writes queued packets.
void WriteIfNotBlocked();
- // Do any work which logically would be done in OnPacket but can not be
- // safely done until the packet is validated. Returns true if the packet
- // can be handled, false otherwise.
- virtual bool ProcessValidatedPacket();
-
// The version of the protocol this connection is using.
QuicVersion version() const { return framer_.version(); }
@@ -490,6 +487,11 @@ class NET_EXPORT_PRIVATE QuicConnection
};
protected:
+ // Do any work which logically would be done in OnPacket but can not be
+ // safely done until the packet is validated. Returns true if the packet
+ // can be handled, false otherwise.
+ virtual bool ProcessValidatedPacket();
+
// Send a packet to the peer using encryption |level|. If |sequence_number|
// is present in the |retransmission_map_|, then contents of this packet will
// be retransmitted with a new sequence number if it's not acked by the peer.
@@ -632,7 +634,8 @@ class NET_EXPORT_PRIVATE QuicConnection
QuicFramer framer_;
QuicConnectionHelperInterface* helper_; // Not owned.
- QuicPacketWriter* writer_; // Not owned.
+ QuicPacketWriter* writer_; // Owned or not depending on |owns_writer_|.
+ bool owns_writer_;
EncryptionLevel encryption_level_;
const QuicClock* clock_;
QuicRandom* random_generator_;
« no previous file with comments | « net/quic/crypto/source_address_token.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698