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

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

Issue 1542123002: Add path_id to SerializedPacket. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110310127
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 unified diff | Download patch
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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 } 1722 }
1723 1723
1724 void QuicConnection::OnWriteError(int error_code) { 1724 void QuicConnection::OnWriteError(int error_code) {
1725 DVLOG(1) << ENDPOINT << "Write failed with error: " << error_code 1725 DVLOG(1) << ENDPOINT << "Write failed with error: " << error_code
1726 << " (" << ErrorToString(error_code) << ")"; 1726 << " (" << ErrorToString(error_code) << ")";
1727 // We can't send an error as the socket is presumably borked. 1727 // We can't send an error as the socket is presumably borked.
1728 CloseConnection(QUIC_PACKET_WRITE_ERROR, false); 1728 CloseConnection(QUIC_PACKET_WRITE_ERROR, false);
1729 } 1729 }
1730 1730
1731 void QuicConnection::OnSerializedPacket(SerializedPacket* serialized_packet) { 1731 void QuicConnection::OnSerializedPacket(SerializedPacket* serialized_packet) {
1732 DCHECK_NE(kInvalidPathId, serialized_packet->path_id);
1732 if (serialized_packet->packet == nullptr) { 1733 if (serialized_packet->packet == nullptr) {
1733 // We failed to serialize the packet, so close the connection. 1734 // We failed to serialize the packet, so close the connection.
1734 // CloseConnection does not send close packet, so no infinite loop here. 1735 // CloseConnection does not send close packet, so no infinite loop here.
1735 CloseConnection(QUIC_ENCRYPTION_FAILURE, false); 1736 CloseConnection(QUIC_ENCRYPTION_FAILURE, false);
1736 return; 1737 return;
1737 } 1738 }
1738 if (serialized_packet->is_fec_packet && fec_alarm_->IsSet()) { 1739 if (serialized_packet->is_fec_packet && fec_alarm_->IsSet()) {
1739 // If an FEC packet is serialized with the FEC alarm set, cancel the alarm. 1740 // If an FEC packet is serialized with the FEC alarm set, cancel the alarm.
1740 fec_alarm_->Cancel(); 1741 fec_alarm_->Cancel();
1741 } 1742 }
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 SendMtuDiscoveryPacket(mtu_discovery_target_); 2404 SendMtuDiscoveryPacket(mtu_discovery_target_);
2404 2405
2405 DCHECK(!mtu_discovery_alarm_->IsSet()); 2406 DCHECK(!mtu_discovery_alarm_->IsSet());
2406 } 2407 }
2407 2408
2408 bool QuicConnection::ack_frame_updated() const { 2409 bool QuicConnection::ack_frame_updated() const {
2409 return received_packet_manager_.ack_frame_updated(); 2410 return received_packet_manager_.ack_frame_updated();
2410 } 2411 }
2411 2412
2412 } // namespace net 2413 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/time_loss_algorithm_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698