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

Unified Diff: net/quic/quic_connection.cc

Issue 1502503002: Move encryption_level from QueuedPacket into SerializedPacket. No functional change. Not flag pro… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108718393
Patch Set: Created 5 years 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_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 95764cbca0ee97e60aee955943a5759dbd6622f8..46aa5316547dda93b9bf4d2380b0701679d32a97 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -237,20 +237,16 @@ class MtuDiscoveryAckListener : public QuicAckListenerInterface {
} // namespace
-QuicConnection::QueuedPacket::QueuedPacket(SerializedPacket packet,
- EncryptionLevel level)
+QuicConnection::QueuedPacket::QueuedPacket(SerializedPacket packet)
: serialized_packet(packet),
- encryption_level(level),
transmission_type(NOT_RETRANSMISSION),
original_packet_number(0) {}
QuicConnection::QueuedPacket::QueuedPacket(
SerializedPacket packet,
- EncryptionLevel level,
TransmissionType transmission_type,
QuicPacketNumber original_packet_number)
: serialized_packet(packet),
- encryption_level(level),
transmission_type(transmission_type),
original_packet_number(original_packet_number) {}
@@ -1469,9 +1465,8 @@ void QuicConnection::WritePendingRetransmissions() {
DVLOG(1) << ENDPOINT << "Retransmitting " << pending.packet_number << " as "
<< serialized_packet.packet_number;
- SendOrQueuePacket(QueuedPacket(
- serialized_packet, pending.retransmittable_frames.encryption_level(),
- pending.transmission_type, pending.packet_number));
+ SendOrQueuePacket(QueuedPacket(serialized_packet, pending.transmission_type,
+ pending.packet_number));
}
}
@@ -1597,7 +1592,8 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
? "data bearing "
: " ack only "))
<< ", encryption level: "
- << QuicUtils::EncryptionLevelToString(packet->encryption_level)
+ << QuicUtils::EncryptionLevelToString(
+ packet->serialized_packet.encryption_level)
<< ", encrypted length:" << encrypted->length();
DVLOG(2) << ENDPOINT << "packet(" << packet_number << "): " << std::endl
<< QuicUtils::StringToHexASCIIDump(encrypted->AsStringPiece());
@@ -1628,8 +1624,7 @@ bool QuicConnection::WritePacketInner(QueuedPacket* packet) {
// Pass the write result to the visitor.
debug_visitor_->OnPacketSent(
packet->serialized_packet, packet->original_packet_number,
- packet->encryption_level, packet->transmission_type,
- encrypted->length(), packet_send_time);
+ packet->transmission_type, encrypted->length(), packet_send_time);
}
if (packet->transmission_type == NOT_RETRANSMISSION) {
time_of_last_sent_new_packet_ = packet_send_time;
@@ -1690,7 +1685,7 @@ bool QuicConnection::ShouldDiscardPacket(const QueuedPacket& packet) {
QuicPacketNumber packet_number = packet.serialized_packet.packet_number;
if (encryption_level_ == ENCRYPTION_FORWARD_SECURE &&
- packet.encryption_level == ENCRYPTION_NONE) {
+ packet.serialized_packet.encryption_level == ENCRYPTION_NONE) {
// Drop packets that are NULL encrypted since the peer won't accept them
// anymore.
DVLOG(1) << ENDPOINT << "Dropping NULL encrypted packet: " << packet_number
@@ -1731,7 +1726,7 @@ void QuicConnection::OnSerializedPacket(
// If an FEC packet is serialized with the FEC alarm set, cancel the alarm.
fec_alarm_->Cancel();
}
- SendOrQueuePacket(QueuedPacket(serialized_packet, encryption_level_));
+ SendOrQueuePacket(QueuedPacket(serialized_packet));
}
void QuicConnection::OnResetFecGroup() {
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698