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

Unified Diff: net/quic/quic_connection.h

Issue 2002083002: Add QuicSentPacketManagerInterface, and QuicSentPacketManager implements it. No functional change e… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/quic_chromium_client_session.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 75385388a222c352c513f06fda23e88a9ac3d065..ab6ee9ca7b46d98fc6bbd628b9d895135d3a30e0 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -45,7 +45,7 @@
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_received_packet_manager.h"
#include "net/quic/quic_sent_entropy_manager.h"
-#include "net/quic/quic_sent_packet_manager.h"
+#include "net/quic/quic_sent_packet_manager_interface.h"
#include "net/quic/quic_time.h"
#include "net/quic/quic_types.h"
@@ -162,7 +162,7 @@ class NET_EXPORT_PRIVATE QuicConnectionVisitorInterface {
// points. Implementations must not mutate the state of the connection
// as a result of these callbacks.
class NET_EXPORT_PRIVATE QuicConnectionDebugVisitor
- : public QuicSentPacketManager::DebugDelegate {
+ : public QuicSentPacketManagerInterface::DebugDelegate {
public:
~QuicConnectionDebugVisitor() override {}
@@ -475,7 +475,7 @@ class NET_EXPORT_PRIVATE QuicConnection
}
void set_debug_visitor(QuicConnectionDebugVisitor* debug_visitor) {
debug_visitor_ = debug_visitor;
- sent_packet_manager_.set_debug_delegate(debug_visitor);
+ sent_packet_manager_->SetDebugDelegate(debug_visitor);
}
// Used in Chromium, but not internally.
void set_creator_debug_delegate(QuicPacketCreator::DebugDelegate* visitor) {
@@ -592,8 +592,8 @@ class NET_EXPORT_PRIVATE QuicConnection
}
// Returns the underlying sent packet manager.
- const QuicSentPacketManager& sent_packet_manager() const {
- return sent_packet_manager_;
+ const QuicSentPacketManagerInterface& sent_packet_manager() const {
+ return *sent_packet_manager_;
}
bool CanWrite(HasRetransmittableData retransmittable);
@@ -684,12 +684,13 @@ class NET_EXPORT_PRIVATE QuicConnection
// cannot be written immediately.
virtual void SendOrQueuePacket(SerializedPacket* packet);
- // Called after a packet is received from a new peer address and is
- // decrypted. Starts validation of peer's address change.
- virtual void StartPeerMigration(PeerAddressChangeType peer_migration_type);
+ // Called after a packet is received from a new peer address on existing
+ // |path_id| and is decrypted. Starts validation of peer's address change.
+ virtual void StartPeerMigration(QuicPathId path_id,
+ PeerAddressChangeType peer_migration_type);
- // Called when a peer migration is validated.
- virtual void OnPeerMigrationValidated();
+ // Called when a peer address migration is validated on |path_id|.
+ virtual void OnPeerMigrationValidated(QuicPathId path_id);
// Selects and updates the version of the protocol being used by selecting a
// version from |available_versions| which is also supported. Returns true if
@@ -793,9 +794,9 @@ class NET_EXPORT_PRIVATE QuicConnection
// the most recently received packet was formerly missing.
void MaybeQueueAck(bool was_missing);
- // Gets the least unacked packet number, which is the next packet number
- // to be sent if there are no outstanding packets.
- QuicPacketNumber GetLeastUnacked() const;
+ // Gets the least unacked packet number of |path_id|, which is the next packet
+ // number to be sent if there are no outstanding packets.
+ QuicPacketNumber GetLeastUnacked(QuicPathId path_id) const;
// Sets the timeout alarm to the appropriate value, if any.
void SetTimeoutAlarm();
@@ -841,6 +842,8 @@ class NET_EXPORT_PRIVATE QuicConnection
// Consider receiving crypto frame on non crypto stream as memory corruption.
bool MaybeConsiderAsMemoryCorruption(const QuicStreamFrame& frame);
+ const QuicTime::Delta DelayedAckTime();
+
QuicFramer framer_;
QuicConnectionHelperInterface* helper_; // Not owned.
QuicAlarmFactory* alarm_factory_; // Not owned.
@@ -1011,7 +1014,7 @@ class NET_EXPORT_PRIVATE QuicConnection
// Sent packet manager which tracks the status of packets sent by this
// connection and contains the send and receive algorithms to determine when
// to send packets.
- QuicSentPacketManager sent_packet_manager_;
+ std::unique_ptr<QuicSentPacketManagerInterface> sent_packet_manager_;
// The state of connection in version negotiation finite state machine.
QuicVersionNegotiationState version_negotiation_state_;
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698