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

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

Issue 286693003: QUIC - cleanup changes per comments for CL's 279453004, 283693002 (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_flags.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/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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 if (!writer_->IsWriteBlocked()) { 1197 if (!writer_->IsWriteBlocked()) {
1198 OnCanWrite(); 1198 OnCanWrite();
1199 } 1199 }
1200 } 1200 }
1201 1201
1202 bool QuicConnection::ProcessValidatedPacket() { 1202 bool QuicConnection::ProcessValidatedPacket() {
1203 if ((!FLAGS_quic_allow_port_migration && peer_port_changed_) || 1203 if ((!FLAGS_quic_allow_port_migration && peer_port_changed_) ||
1204 peer_ip_changed_ || self_ip_changed_ || self_port_changed_) { 1204 peer_ip_changed_ || self_ip_changed_ || self_port_changed_) {
1205 SendConnectionCloseWithDetails( 1205 SendConnectionCloseWithDetails(
1206 QUIC_ERROR_MIGRATING_ADDRESS, 1206 QUIC_ERROR_MIGRATING_ADDRESS,
1207 "IP or port migration is not yet a supported feature"); 1207 "Neither IP address migration, nor self port migration are supported.");
1208 return false; 1208 return false;
1209 } 1209 }
1210 1210
1211 // Port migration is supported, do it now if port has changed. 1211 // Port migration is supported, do it now if port has changed.
1212 if (FLAGS_quic_allow_port_migration && 1212 if (FLAGS_quic_allow_port_migration &&
1213 peer_port_changed_) { 1213 peer_port_changed_) {
1214 DVLOG(1) << ENDPOINT << "Peer's port changed from " 1214 DVLOG(1) << ENDPOINT << "Peer's port changed from "
1215 << peer_address_.port() << " to " << migrating_peer_port_ 1215 << peer_address_.port() << " to " << migrating_peer_port_
1216 << ", migrating connection."; 1216 << ", migrating connection.";
1217 peer_address_ = IPEndPoint(peer_address_.address(), migrating_peer_port_); 1217 peer_address_ = IPEndPoint(peer_address_.address(), migrating_peer_port_);
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 // If we changed the generator's batch state, restore original batch state. 1989 // If we changed the generator's batch state, restore original batch state.
1990 if (!already_in_batch_mode_) { 1990 if (!already_in_batch_mode_) {
1991 DVLOG(1) << "Leaving Batch Mode."; 1991 DVLOG(1) << "Leaving Batch Mode.";
1992 connection_->packet_generator_.FinishBatchOperations(); 1992 connection_->packet_generator_.FinishBatchOperations();
1993 } 1993 }
1994 DCHECK_EQ(already_in_batch_mode_, 1994 DCHECK_EQ(already_in_batch_mode_,
1995 connection_->packet_generator_.InBatchMode()); 1995 connection_->packet_generator_.InBatchMode());
1996 } 1996 }
1997 1997
1998 } // namespace net 1998 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698