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

Unified Diff: net/quic/core/quic_unacked_packet_map.cc

Issue 2916033003: Landing Recent QUIC changes until 03:18 AM, May 28, UTC (Closed)
Patch Set: A few more EXPORTs. 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 | « net/quic/core/quic_unacked_packet_map.h ('k') | net/quic/core/stream_notifier_interface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_unacked_packet_map.cc
diff --git a/net/quic/core/quic_unacked_packet_map.cc b/net/quic/core/quic_unacked_packet_map.cc
index 8c5fbf1b57e4535cab6021ac5c1101e5ed8e8419..4c5f8b2deb210e0bd5c9c2ac98f3b954eb46a803 100644
--- a/net/quic/core/quic_unacked_packet_map.cc
+++ b/net/quic/core/quic_unacked_packet_map.cc
@@ -16,7 +16,8 @@ QuicUnackedPacketMap::QuicUnackedPacketMap()
largest_observed_(0),
least_unacked_(1),
bytes_in_flight_(0),
- pending_crypto_packet_count_(0) {}
+ pending_crypto_packet_count_(0),
+ stream_notifier_(nullptr) {}
QuicUnackedPacketMap::~QuicUnackedPacketMap() {
for (QuicTransmissionInfo& transmission_info : unacked_packets_) {
@@ -102,6 +103,13 @@ void QuicUnackedPacketMap::TransferRetransmissionInfo(
QuicTransmissionInfo* transmission_info =
&unacked_packets_.at(old_packet_number - least_unacked_);
QuicFrames* frames = &transmission_info->retransmittable_frames;
+ if (stream_notifier_ != nullptr) {
+ for (const QuicFrame& frame : *frames) {
+ if (frame.type == STREAM_FRAME) {
+ stream_notifier_->OnStreamFrameRetransmitted(*frame.stream_frame);
+ }
+ }
+ }
for (AckListenerWrapper& wrapper : transmission_info->ack_listeners) {
wrapper.ack_listener->OnPacketRetransmitted(wrapper.length);
}
@@ -350,4 +358,23 @@ QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const {
return least_unacked_;
}
+void QuicUnackedPacketMap::SetStreamNotifier(
+ StreamNotifierInterface* stream_notifier) {
+ stream_notifier_ = stream_notifier;
+}
+
+void QuicUnackedPacketMap::NotifyStreamFramesAcked(
+ const QuicTransmissionInfo& info,
+ QuicTime::Delta ack_delay) {
+ if (stream_notifier_ == nullptr) {
+ return;
+ }
+
+ for (const QuicFrame& frame : info.retransmittable_frames) {
+ if (frame.type == STREAM_FRAME) {
+ stream_notifier_->OnStreamFrameAcked(*frame.stream_frame, ack_delay);
+ }
+ }
+}
+
} // namespace net
« no previous file with comments | « net/quic/core/quic_unacked_packet_map.h ('k') | net/quic/core/stream_notifier_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698