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

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

Issue 2820263005: In QUIC version >= 38, enables random padding of size [1, 256] (Closed)
Patch Set: Created 3 years, 8 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
Index: net/quic/core/quic_packet_creator.cc
diff --git a/net/quic/core/quic_packet_creator.cc b/net/quic/core/quic_packet_creator.cc
index 823959bb672ac712bf205e53cd1f93c125508ae5..94f467affe5860a9edfc6556f31402f617715c8b 100644
--- a/net/quic/core/quic_packet_creator.cc
+++ b/net/quic/core/quic_packet_creator.cc
@@ -14,6 +14,7 @@
#include "net/quic/core/quic_utils.h"
#include "net/quic/platform/api/quic_aligned.h"
#include "net/quic/platform/api/quic_bug_tracker.h"
+#include "net/quic/platform/api/quic_flag_utils.h"
#include "net/quic/platform/api/quic_logging.h"
#include "net/quic/platform/api/quic_string_piece.h"
@@ -645,6 +646,7 @@ void QuicPacketCreator::MaybeAddPadding() {
packet_.num_padding_bytes =
std::min<int16_t>(pending_padding_bytes_, BytesFree());
pending_padding_bytes_ -= packet_.num_padding_bytes;
+ QUIC_FLAG_COUNT(quic_reloadable_flag_quic_enable_random_padding);
}
bool success =

Powered by Google App Engine
This is Rietveld 408576698