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

Unified Diff: net/quic/core/congestion_control/bandwidth_sampler.h

Issue 2901773004: Landing Recent QUIC changes until May 20, 2017. (Closed)
Patch Set: Disable quic_restart_flag_quic_big_endian_connection_id_server until tests can be fixed. Created 3 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 | « no previous file | net/quic/core/congestion_control/bandwidth_sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/congestion_control/bandwidth_sampler.h
diff --git a/net/quic/core/congestion_control/bandwidth_sampler.h b/net/quic/core/congestion_control/bandwidth_sampler.h
index 0bedd6cae72e200352cb8d3f7323cd17c3e3f5bc..7584540418696990c6381fc8fd9c4c4fa48ca39a 100644
--- a/net/quic/core/congestion_control/bandwidth_sampler.h
+++ b/net/quic/core/congestion_control/bandwidth_sampler.h
@@ -5,6 +5,7 @@
#ifndef NET_QUIC_CORE_CONGESTION_CONTROL_BANDWIDTH_SAMPLER_H_
#define NET_QUIC_CORE_CONGESTION_CONTROL_BANDWIDTH_SAMPLER_H_
+#include "net/quic/core/packet_number_indexed_queue.h"
#include "net/quic/core/quic_bandwidth.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/core/quic_time.h"
@@ -206,6 +207,13 @@ class QUIC_EXPORT_PRIVATE BandwidthSampler {
total_bytes_acked_at_the_last_acked_packet(
sampler.total_bytes_acked_),
is_app_limited(sampler.is_app_limited_) {}
+
+ // Default constructor. Required to put this structure into
+ // PacketNumberIndexedQueue.
+ ConnectionStateOnSentPacket()
+ : sent_time(QuicTime::Zero()),
+ last_acked_packet_sent_time(QuicTime::Zero()),
+ last_acked_packet_ack_time(QuicTime::Zero()) {}
};
typedef QuicLinkedHashMap<QuicPacketNumber, ConnectionStateOnSentPacket>
@@ -242,6 +250,16 @@ class QUIC_EXPORT_PRIVATE BandwidthSampler {
// Record of the connection state at the point where each packet in flight was
// sent, indexed by the packet number.
ConnectionStateMap connection_state_map_;
+ PacketNumberIndexedQueue<ConnectionStateOnSentPacket>
+ connection_state_map_new_;
+ const bool use_new_connection_state_map_;
+
+ // Handles the actual bandwidth calculations, whereas the outer method handles
+ // retrieving and removing |sent_packet|.
+ BandwidthSample OnPacketAcknowledgedInner(
+ QuicTime ack_time,
+ QuicPacketNumber packet_number,
+ const ConnectionStateOnSentPacket& sent_packet);
};
} // namespace net
« no previous file with comments | « no previous file | net/quic/core/congestion_control/bandwidth_sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698