summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-14 21:28:02 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-14 21:28:02 +0000
commit27e16d06d11982478cbbd83317b597f5e9acc921 (patch)
tree10cb7215e2dd9a12fd21a3a030f53c885f6cb8b9 /net
parent2992413f883106e33c1c173429370abd7ebea617 (diff)
downloadchromium_src-27e16d06d11982478cbbd83317b597f5e9acc921.zip
chromium_src-27e16d06d11982478cbbd83317b597f5e9acc921.tar.gz
chromium_src-27e16d06d11982478cbbd83317b597f5e9acc921.tar.bz2
QUIC - cleanup changes per comments for CL's 279453004, 283693002
+ Fixed comments. + Used "for" loop instead of "while" loop. https://codereview.chromium.org/279453004/ https://codereview.chromium.org/283693002/ R=wtc@chromium.org Review URL: https://codereview.chromium.org/286693003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_connection.cc2
-rw-r--r--net/quic/quic_connection.h2
-rw-r--r--net/quic/quic_flags.cc2
-rw-r--r--net/quic/quic_sent_packet_manager.cc21
-rw-r--r--net/tools/quic/end_to_end_test.cc2
5 files changed, 14 insertions, 15 deletions
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index d834f20..be606c2 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -1204,7 +1204,7 @@ bool QuicConnection::ProcessValidatedPacket() {
peer_ip_changed_ || self_ip_changed_ || self_port_changed_) {
SendConnectionCloseWithDetails(
QUIC_ERROR_MIGRATING_ADDRESS,
- "IP or port migration is not yet a supported feature");
+ "Neither IP address migration, nor self port migration are supported.");
return false;
}
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index f5e152f..3e43e9d 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -753,7 +753,7 @@ class NET_EXPORT_PRIVATE QuicConnection
bool self_ip_changed_;
// Set to true if the UDP packet headers are addressed to a different port.
- // If true, and the IP has not changed, then we can migrate the connection.
+ // We do not support connection migration when the self port changed.
bool self_port_changed_;
// If non-empty this contains the set of versions received in a
diff --git a/net/quic/quic_flags.cc b/net/quic/quic_flags.cc
index faefb35..8a4ed13 100644
--- a/net/quic/quic_flags.cc
+++ b/net/quic/quic_flags.cc
@@ -37,5 +37,5 @@ bool FLAGS_quic_allow_oversized_packets_for_test = false;
// When true, the use time based loss detection instead of nack.
bool FLAGS_quic_use_time_loss_detection = false;
-// If true, allow port migration of established QUIC connections.
+// If true, allow peer port migration of established QUIC connections.
bool FLAGS_quic_allow_port_migration = true;
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index 121a7a5..cffdd4d 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -251,22 +251,21 @@ void QuicSentPacketManager::RetransmitUnackedPackets(
}
void QuicSentPacketManager::NeuterUnencryptedPackets() {
- QuicUnackedPacketMap::const_iterator unacked_it = unacked_packets_.begin();
- while (unacked_it != unacked_packets_.end()) {
+ for (QuicUnackedPacketMap::const_iterator it = unacked_packets_.begin();
+ it != unacked_packets_.end(); ++it) {
const RetransmittableFrames* frames =
- unacked_it->second.retransmittable_frames;
+ it->second.retransmittable_frames;
if (frames != NULL && frames->encryption_level() == ENCRYPTION_NONE) {
- // Since once you're forward secure, no unencrypted packets will be sent,
- // crypto or otherwise. Unencrypted packets are neutered and abandoned, to
- // ensure they are not retransmitted or considered lost from a congestion
- // control perspective.
- pending_retransmissions_.erase(unacked_it->first);
+ // Once you're forward secure, no unencrypted packets will be sent, crypto
+ // or otherwise. Unencrypted packets are neutered and abandoned, to ensure
+ // they are not retransmitted or considered lost from a congestion control
+ // perspective.
+ pending_retransmissions_.erase(it->first);
// TODO(ianswett): This may cause packets to linger forever in the
// UnackedPacketMap.
- unacked_packets_.NeuterPacket(unacked_it->first);
- unacked_packets_.SetNotPending(unacked_it->first);
+ unacked_packets_.NeuterPacket(it->first);
+ unacked_packets_.SetNotPending(it->first);
}
- ++unacked_it;
}
}
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 88788cc..cf56826 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -660,7 +660,7 @@ TEST_P(EndToEndTest, LargePostFEC) {
TEST_P(EndToEndTest, LargePostSmallBandwidthLargeBuffer) {
ASSERT_TRUE(Initialize());
SetPacketSendDelay(QuicTime::Delta::FromMicroseconds(1));
- // 256KB per second with a 256k buffer from server to client. Wireless
+ // 256KB per second with a 256KB buffer from server to client. Wireless
// clients commonly have larger buffers, but our max CWND is 200.
server_writer_->set_max_bandwidth_and_buffer_size(
QuicBandwidth::FromBytesPerSecond(256 * 1024), 256 * 1024);