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

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

Issue 2350863002: Deprecate FLAGS_quic_do_not_send_ack_on_emsgsize. (Closed)
Patch Set: Created 4 years, 3 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/core/quic_connection_test.cc » ('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/core/quic_connection.h" 5 #include "net/quic/core/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 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 const string error_details = "Write failed with error: " + 1779 const string error_details = "Write failed with error: " +
1780 base::IntToString(error_code) + " (" + 1780 base::IntToString(error_code) + " (" +
1781 ErrorToString(error_code) + ")"; 1781 ErrorToString(error_code) + ")";
1782 DVLOG(1) << ENDPOINT << error_details; 1782 DVLOG(1) << ENDPOINT << error_details;
1783 // We can't send an error as the socket is presumably borked. 1783 // We can't send an error as the socket is presumably borked.
1784 switch (error_code) { 1784 switch (error_code) {
1785 case kMessageTooBigErrorCode: 1785 case kMessageTooBigErrorCode:
1786 if (FLAGS_quic_close_connection_on_packet_too_large) { // NOLINT 1786 if (FLAGS_quic_close_connection_on_packet_too_large) { // NOLINT
1787 CloseConnection( 1787 CloseConnection(
1788 QUIC_PACKET_WRITE_ERROR, error_details, 1788 QUIC_PACKET_WRITE_ERROR, error_details,
1789 FLAGS_quic_do_not_send_ack_on_emsgsize 1789 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET_WITH_NO_ACK);
1790 ? ConnectionCloseBehavior::
1791 SEND_CONNECTION_CLOSE_PACKET_WITH_NO_ACK
1792 : ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
1793 break; 1790 break;
1794 } 1791 }
1795 default: 1792 default:
1796 // We can't send an error as the socket is presumably borked. 1793 // We can't send an error as the socket is presumably borked.
1797 TearDownLocalConnectionState(QUIC_PACKET_WRITE_ERROR, error_details, 1794 TearDownLocalConnectionState(QUIC_PACKET_WRITE_ERROR, error_details,
1798 ConnectionCloseSource::FROM_SELF); 1795 ConnectionCloseSource::FROM_SELF);
1799 } 1796 }
1800 } 1797 }
1801 1798
1802 void QuicConnection::OnSerializedPacket(SerializedPacket* serialized_packet) { 1799 void QuicConnection::OnSerializedPacket(SerializedPacket* serialized_packet) {
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 2536
2540 void QuicConnection::CheckIfApplicationLimited() { 2537 void QuicConnection::CheckIfApplicationLimited() {
2541 if (queued_packets_.empty() && 2538 if (queued_packets_.empty() &&
2542 !sent_packet_manager_->HasPendingRetransmissions() && 2539 !sent_packet_manager_->HasPendingRetransmissions() &&
2543 !visitor_->WillingAndAbleToWrite()) { 2540 !visitor_->WillingAndAbleToWrite()) {
2544 sent_packet_manager_->OnApplicationLimited(); 2541 sent_packet_manager_->OnApplicationLimited();
2545 } 2542 }
2546 } 2543 }
2547 2544
2548 } // namespace net 2545 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698