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

Unified Diff: net/quic/quic_packet_generator.cc

Issue 789103013: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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_packet_generator.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index 74617ef602e2855d79a455547655597f1f3dc627..a7f0af08ade11a8577f4d79ce4ca5ddd1f1f281e 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -183,7 +183,13 @@ QuicConsumedData QuicPacketGenerator::ConsumeData(
++frames_created;
// We want to track which packet this stream frame ends up in.
- frame.stream_frame->notifier = notifier;
+ if (FLAGS_quic_attach_ack_notifiers_to_packets) {
+ if (notifier != nullptr) {
+ ack_notifiers_.insert(notifier);
+ }
+ } else {
+ frame.stream_frame->notifier = notifier;
+ }
if (!AddFrame(frame)) {
LOG(DFATAL) << "Failed to add stream frame.";
@@ -389,6 +395,13 @@ bool QuicPacketGenerator::AddFrame(const QuicFrame& frame) {
void QuicPacketGenerator::SerializeAndSendPacket() {
SerializedPacket serialized_packet = packet_creator_.SerializePacket();
DCHECK(serialized_packet.packet);
+
+ // There may be AckNotifiers interested in this packet.
+ if (FLAGS_quic_attach_ack_notifiers_to_packets) {
+ serialized_packet.notifiers.swap(ack_notifiers_);
+ ack_notifiers_.clear();
+ }
+
delegate_->OnSerializedPacket(serialized_packet);
MaybeSendFecPacketAndCloseGroup(false);
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698