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

Unified Diff: net/quic/quic_connection.cc

Issue 301173007: Replaced options from QuicPacketCreator with members and explicit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('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 8162c3c964dc98304587d17590f43edef5b75bcc..c36010b4604aca2d846687d755b364a30a619974 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1066,7 +1066,7 @@ const QuicConnectionStats& QuicConnection::GetStats() {
stats_.estimated_bandwidth =
sent_packet_manager_.BandwidthEstimate().ToBytesPerSecond();
stats_.congestion_window = sent_packet_manager_.GetCongestionWindow();
- stats_.max_packet_size = options()->max_packet_length;
+ stats_.max_packet_size = packet_creator_.max_packet_length();
return stats_;
}
@@ -1196,8 +1196,8 @@ bool QuicConnection::ProcessValidatedPacket() {
<< time_of_last_received_packet_.ToDebuggingValue();
if (is_server_ && encryption_level_ == ENCRYPTION_NONE &&
- last_size_ > options()->max_packet_length) {
- options()->max_packet_length = last_size_;
+ last_size_ > packet_creator_.max_packet_length()) {
+ packet_creator_.set_max_packet_length(last_size_);
}
return true;
}
@@ -1375,9 +1375,10 @@ bool QuicConnection::WritePacket(QueuedPacket packet) {
encrypted_deleter.reset(encrypted);
}
- LOG_IF(DFATAL, encrypted->length() > options()->max_packet_length)
+ LOG_IF(DFATAL, encrypted->length() >
+ packet_creator_.max_packet_length())
<< "Writing an encrypted packet larger than max_packet_length:"
- << options()->max_packet_length << " encrypted length: "
+ << packet_creator_.max_packet_length() << " encrypted length: "
<< encrypted->length();
DVLOG(1) << ENDPOINT << "Sending packet " << sequence_number
<< " : " << (packet.packet->is_fec_packet() ? "FEC " :
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698