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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 188273003: QUIC refactor to move the pending_crypto_packet_count_ from the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_sent_packet_manager.h ('k') | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index fcfa29dfda09eeb0f88806923d62647c9a33d40b..d8a8ce8ba07be82c11ece995617be05504554c20 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -75,7 +75,6 @@ QuicSentPacketManager::QuicSentPacketManager(bool is_server,
loss_algorithm_(LossDetectionInterface::Create()),
rtt_sample_(QuicTime::Delta::Infinite()),
largest_observed_(0),
- pending_crypto_packet_count_(0),
consecutive_rto_count_(0),
consecutive_tlp_count_(0),
consecutive_crypto_retransmission_count_(0),
@@ -108,11 +107,6 @@ void QuicSentPacketManager::OnSerializedPacket(
const SerializedPacket& serialized_packet) {
if (serialized_packet.retransmittable_frames) {
ack_notifier_manager_.OnSerializedPacket(serialized_packet);
-
- if (serialized_packet.retransmittable_frames->HasCryptoHandshake()
- == IS_HANDSHAKE) {
- ++pending_crypto_packet_count_;
- }
}
unacked_packets_.AddPacket(serialized_packet);
@@ -313,11 +307,8 @@ QuicSentPacketManager::MarkPacketHandled(
++stats_->packets_spuriously_retransmitted;
}
- bool has_cryto_handshake = HasCryptoHandshake(
+ bool has_crypto_handshake = HasCryptoHandshake(
unacked_packets_.GetTransmissionInfo(newest_transmission));
- if (has_cryto_handshake) {
- --pending_crypto_packet_count_;
- }
while (all_transmissions_it != all_transmissions.rend()) {
QuicPacketSequenceNumber previous_transmission = *all_transmissions_it;
const QuicUnackedPacketMap::TransmissionInfo& transmission_info =
@@ -327,7 +318,7 @@ QuicSentPacketManager::MarkPacketHandled(
// marked for retransmission.
pending_retransmissions_.erase(previous_transmission);
}
- if (has_cryto_handshake) {
+ if (has_crypto_handshake) {
// If it's a crypto handshake packet, discard it and all retransmissions,
// since they won't be acked now that one has been processed.
if (transmission_info.pending) {
@@ -499,7 +490,7 @@ void QuicSentPacketManager::RetransmitAllPackets() {
QuicSentPacketManager::RetransmissionTimeoutMode
QuicSentPacketManager::GetRetransmissionMode() const {
DCHECK(unacked_packets_.HasPendingPackets());
- if (pending_crypto_packet_count_ > 0) {
+ if (unacked_packets_.HasPendingCryptoPackets()) {
return HANDSHAKE_MODE;
}
if (loss_algorithm_->GetLossTimeout() != QuicTime::Zero()) {
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_unacked_packet_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698