Let session methods that write data take argument of TransmissionType so that it's clear at which transmission type the data is written.
gfe-relnote: no behavior change. not protected.
PiperOrigin-RevId: 298673372
Change-Id: Ibe1e680be7bce0e6310f8b6db50f7f86c4c8a206
diff --git a/quic/core/quic_control_frame_manager.cc b/quic/core/quic_control_frame_manager.cc
index e1053f1..d615582 100644
--- a/quic/core/quic_control_frame_manager.cc
+++ b/quic/core/quic_control_frame_manager.cc
@@ -8,6 +8,7 @@
#include "net/third_party/quiche/src/quic/core/quic_constants.h"
#include "net/third_party/quiche/src/quic/core/quic_session.h"
+#include "net/third_party/quiche/src/quic/core/quic_types.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_bug_tracker.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_flag_utils.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_map_util.h"
@@ -254,7 +255,10 @@
WriteBufferedFrames();
}
-bool QuicControlFrameManager::RetransmitControlFrame(const QuicFrame& frame) {
+bool QuicControlFrameManager::RetransmitControlFrame(const QuicFrame& frame,
+ TransmissionType type) {
+ DCHECK(type == PTO_RETRANSMISSION || type == RTO_RETRANSMISSION ||
+ type == TLP_RETRANSMISSION || type == PROBING_RETRANSMISSION);
QuicControlFrameId id = GetControlFrameId(frame);
if (id == kInvalidControlFrameId) {
// Frame does not have a valid control frame ID, ignore it. Returns true
@@ -277,7 +281,7 @@
QuicFrame copy = CopyRetransmittableControlFrame(frame);
QUIC_DVLOG(1) << "control frame manager is forced to retransmit frame: "
<< frame;
- if (session_->WriteControlFrame(copy)) {
+ if (session_->WriteControlFrame(copy, type)) {
return true;
}
DeleteFrame(©);
@@ -292,7 +296,7 @@
QuicFrame frame_to_send =
control_frames_.at(least_unsent_ - least_unacked_);
QuicFrame copy = CopyRetransmittableControlFrame(frame_to_send);
- if (!session_->WriteControlFrame(copy)) {
+ if (!session_->WriteControlFrame(copy, NOT_RETRANSMISSION)) {
// Connection is write blocked.
DeleteFrame(©);
break;
@@ -305,7 +309,7 @@
while (HasPendingRetransmission()) {
QuicFrame pending = NextPendingRetransmission();
QuicFrame copy = CopyRetransmittableControlFrame(pending);
- if (!session_->WriteControlFrame(copy)) {
+ if (!session_->WriteControlFrame(copy, LOSS_RETRANSMISSION)) {
// Connection is write blocked.
DeleteFrame(©);
break;