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

Side by Side Diff: net/quic/quic_connection.cc

Issue 1781043004: Remove the force param from QuicPacketGenerator::SetMaxPacketLength because path MTU packets should… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116272960
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/quic_packet_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK); 1976 ScopedPacketBundler ack_bundler(this, BUNDLE_PENDING_ACK);
1977 packet_generator_.AddControlFrame( 1977 packet_generator_.AddControlFrame(
1978 QuicFrame(new QuicGoAwayFrame(error, last_good_stream_id, reason))); 1978 QuicFrame(new QuicGoAwayFrame(error, last_good_stream_id, reason)));
1979 } 1979 }
1980 1980
1981 QuicByteCount QuicConnection::max_packet_length() const { 1981 QuicByteCount QuicConnection::max_packet_length() const {
1982 return packet_generator_.GetMaxPacketLength(); 1982 return packet_generator_.GetMaxPacketLength();
1983 } 1983 }
1984 1984
1985 void QuicConnection::SetMaxPacketLength(QuicByteCount length) { 1985 void QuicConnection::SetMaxPacketLength(QuicByteCount length) {
1986 return packet_generator_.SetMaxPacketLength(LimitMaxPacketSize(length), 1986 return packet_generator_.SetMaxPacketLength(LimitMaxPacketSize(length));
1987 /*force=*/false);
1988 } 1987 }
1989 1988
1990 bool QuicConnection::HasQueuedData() const { 1989 bool QuicConnection::HasQueuedData() const {
1991 return pending_version_negotiation_packet_ || !queued_packets_.empty() || 1990 return pending_version_negotiation_packet_ || !queued_packets_.empty() ||
1992 packet_generator_.HasQueuedFrames(); 1991 packet_generator_.HasQueuedFrames();
1993 } 1992 }
1994 1993
1995 void QuicConnection::EnableSavingCryptoPackets() { 1994 void QuicConnection::EnableSavingCryptoPackets() {
1996 save_crypto_packets_as_termination_packets_ = true; 1995 save_crypto_packets_as_termination_packets_ = true;
1997 } 1996 }
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 } 2344 }
2346 2345
2347 StringPiece QuicConnection::GetCurrentPacket() { 2346 StringPiece QuicConnection::GetCurrentPacket() {
2348 if (current_packet_data_ == nullptr) { 2347 if (current_packet_data_ == nullptr) {
2349 return StringPiece(); 2348 return StringPiece();
2350 } 2349 }
2351 return StringPiece(current_packet_data_, last_size_); 2350 return StringPiece(current_packet_data_, last_size_);
2352 } 2351 }
2353 2352
2354 } // namespace net 2353 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_packet_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698