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

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

Issue 451903002: Deprecate rolled out flag: FLAGS_quic_allow_port_migration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Along_with_sending_SCUP_72652054
Patch Set: Created 6 years, 4 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_flags.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 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 } 1172 }
1173 } 1173 }
1174 1174
1175 void QuicConnection::WriteIfNotBlocked() { 1175 void QuicConnection::WriteIfNotBlocked() {
1176 if (!writer_->IsWriteBlocked()) { 1176 if (!writer_->IsWriteBlocked()) {
1177 OnCanWrite(); 1177 OnCanWrite();
1178 } 1178 }
1179 } 1179 }
1180 1180
1181 bool QuicConnection::ProcessValidatedPacket() { 1181 bool QuicConnection::ProcessValidatedPacket() {
1182 if ((!FLAGS_quic_allow_port_migration && peer_port_changed_) || 1182 if (peer_ip_changed_ || self_ip_changed_ || self_port_changed_) {
1183 peer_ip_changed_ || self_ip_changed_ || self_port_changed_) {
1184 SendConnectionCloseWithDetails( 1183 SendConnectionCloseWithDetails(
1185 QUIC_ERROR_MIGRATING_ADDRESS, 1184 QUIC_ERROR_MIGRATING_ADDRESS,
1186 "Neither IP address migration, nor self port migration are supported."); 1185 "Neither IP address migration, nor self port migration are supported.");
1187 return false; 1186 return false;
1188 } 1187 }
1189 1188
1190 // Port migration is supported, do it now if port has changed. 1189 // Peer port migration is supported, do it now if port has changed.
1191 if (FLAGS_quic_allow_port_migration && 1190 if (peer_port_changed_) {
1192 peer_port_changed_) {
1193 DVLOG(1) << ENDPOINT << "Peer's port changed from " 1191 DVLOG(1) << ENDPOINT << "Peer's port changed from "
1194 << peer_address_.port() << " to " << migrating_peer_port_ 1192 << peer_address_.port() << " to " << migrating_peer_port_
1195 << ", migrating connection."; 1193 << ", migrating connection.";
1196 peer_address_ = IPEndPoint(peer_address_.address(), migrating_peer_port_); 1194 peer_address_ = IPEndPoint(peer_address_.address(), migrating_peer_port_);
1197 } 1195 }
1198 1196
1199 time_of_last_received_packet_ = clock_->Now(); 1197 time_of_last_received_packet_ = clock_->Now();
1200 DVLOG(1) << ENDPOINT << "time of last received packet: " 1198 DVLOG(1) << ENDPOINT << "time of last received packet: "
1201 << time_of_last_received_packet_.ToDebuggingValue(); 1199 << time_of_last_received_packet_.ToDebuggingValue();
1202 1200
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 // If we changed the generator's batch state, restore original batch state. 1988 // If we changed the generator's batch state, restore original batch state.
1991 if (!already_in_batch_mode_) { 1989 if (!already_in_batch_mode_) {
1992 DVLOG(1) << "Leaving Batch Mode."; 1990 DVLOG(1) << "Leaving Batch Mode.";
1993 connection_->packet_generator_.FinishBatchOperations(); 1991 connection_->packet_generator_.FinishBatchOperations();
1994 } 1992 }
1995 DCHECK_EQ(already_in_batch_mode_, 1993 DCHECK_EQ(already_in_batch_mode_,
1996 connection_->packet_generator_.InBatchMode()); 1994 connection_->packet_generator_.InBatchMode());
1997 } 1995 }
1998 1996
1999 } // namespace net 1997 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698