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

Unified Diff: trunk/src/net/quic/quic_connection.h

Issue 16374004: Revert 204046 "Land Recent QUIC changes." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 6 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 | « trunk/src/net/quic/crypto/crypto_server_config.cc ('k') | trunk/src/net/quic/quic_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/quic/quic_connection.h
===================================================================
--- trunk/src/net/quic/quic_connection.h (revision 204061)
+++ trunk/src/net/quic/quic_connection.h (working copy)
@@ -431,6 +431,15 @@
// Make sure an ack we got from our peer is sane.
bool ValidateAckFrame(const QuicAckFrame& incoming_ack);
+ // These two are called by OnAckFrame to update the appropriate internal
+ // state.
+ //
+ // Updates internal state based on incoming_ack.received_info
+ void UpdatePacketInformationReceivedByPeer(
+ const QuicAckFrame& incoming_ack);
+ // Updates internal state based in incoming_ack.sent_info
+ void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack);
+
QuicConnectionHelperInterface* helper() { return helper_.get(); }
protected:
@@ -461,32 +470,21 @@
struct RetransmissionInfo {
explicit RetransmissionInfo(QuicPacketSequenceNumber sequence_number)
: sequence_number(sequence_number),
+ scheduled_time(QuicTime::Zero()),
number_nacks(0),
number_retransmissions(0) {
}
QuicPacketSequenceNumber sequence_number;
+ QuicTime scheduled_time;
size_t number_nacks;
size_t number_retransmissions;
};
- struct RetransmissionTime {
- RetransmissionTime(QuicPacketSequenceNumber sequence_number,
- const QuicTime& scheduled_time,
- bool for_fec)
- : sequence_number(sequence_number),
- scheduled_time(scheduled_time),
- for_fec(for_fec) { }
-
- QuicPacketSequenceNumber sequence_number;
- QuicTime scheduled_time;
- bool for_fec;
- };
-
- class RetransmissionTimeComparator {
+ class RetransmissionInfoComparator {
public:
- bool operator()(const RetransmissionTime& lhs,
- const RetransmissionTime& rhs) const {
+ bool operator()(const RetransmissionInfo& lhs,
+ const RetransmissionInfo& rhs) const {
DCHECK(lhs.scheduled_time.IsInitialized() &&
rhs.scheduled_time.IsInitialized());
return lhs.scheduled_time > rhs.scheduled_time;
@@ -499,9 +497,9 @@
typedef std::map<QuicFecGroupNumber, QuicFecGroup*> FecGroupMap;
typedef base::hash_map<QuicPacketSequenceNumber,
RetransmissionInfo> RetransmissionMap;
- typedef std::priority_queue<RetransmissionTime,
- std::vector<RetransmissionTime>,
- RetransmissionTimeComparator>
+ typedef std::priority_queue<RetransmissionInfo,
+ std::vector<RetransmissionInfo>,
+ RetransmissionInfoComparator>
RetransmissionTimeouts;
// Selects and updates the version of the protocol being used by selecting a
@@ -511,11 +509,9 @@
// Sends a version negotiation packet to the peer.
void SendVersionNegotiationPacket();
- void SetupRetransmission(QuicPacketSequenceNumber sequence_number);
+ void MaybeSetupRetransmission(QuicPacketSequenceNumber sequence_number);
bool IsRetransmission(QuicPacketSequenceNumber sequence_number);
- void SetupAbandonFecTimer(QuicPacketSequenceNumber sequence_number);
-
// Drop packet corresponding to |sequence_number| by deleting entries from
// |unacked_packets_| and |retransmission_map_|, if present. We need to drop
// all packets with encryption level NONE after the default level has been set
@@ -530,25 +526,10 @@
// revive and process the packet.
void MaybeProcessRevivedPacket();
- void HandleAckForSentPackets(const QuicAckFrame& incoming_ack,
- SequenceNumberSet* acked_packets);
- void HandleAckForSentFecPackets(const QuicAckFrame& incoming_ack,
- SequenceNumberSet* acked_packets);
-
- // These two are called by OnAckFrame.
- //
- // Updates internal state based on incoming_ack.received_info
- void UpdatePacketInformationReceivedByPeer(
- const QuicAckFrame& incoming_ack);
- // Updates internal state based on incoming_ack.sent_info
- void UpdatePacketInformationSentByPeer(const QuicAckFrame& incoming_ack);
-
void UpdateOutgoingAck();
void MaybeSendAckInResponseToPacket();
- void MaybeAbandonFecPacket(QuicPacketSequenceNumber sequence_number);
-
// Get the FEC group associate with the last processed packet or NULL, if the
// group has already been deleted.
QuicFecGroup* GetFecGroup();
@@ -591,12 +572,6 @@
// to this map, which contains owning pointers to the contained frames.
UnackedPacketMap unacked_packets_;
- // Pending fec packets that have not been acked yet. These packets need to be
- // cleared out of the cgst_window after a timeout since FEC packets are never
- // retransmitted.
- // Ask: What should be the timeout for these packets?
- UnackedPacketMap unacked_fec_packets_;
-
// Heap of packets that we might need to retransmit, and the time at
// which we should retransmit them. Every time a packet is sent it is added
// to this heap which is O(log(number of pending packets to be retransmitted))
« no previous file with comments | « trunk/src/net/quic/crypto/crypto_server_config.cc ('k') | trunk/src/net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698