summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 03:58:35 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-12 03:58:35 +0000
commite4e44eb805501a71623b2a50e808fa7c454d16aa (patch)
treeccf502eee5aa39b151bf2c257df0c9b515df25ce /net
parente3b1938800fb6eb41a7d913a7f9836177e19ab00 (diff)
downloadchromium_src-e4e44eb805501a71623b2a50e808fa7c454d16aa.zip
chromium_src-e4e44eb805501a71623b2a50e808fa7c454d16aa.tar.gz
chromium_src-e4e44eb805501a71623b2a50e808fa7c454d16aa.tar.bz2
Fixing nits from Chrome review 11446029.
Merge internal change: 40341454 Review URL: https://chromiumcodereview.appspot.com/11824003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/quic/quic_connection.cc2
-rw-r--r--net/quic/quic_connection.h7
-rw-r--r--net/quic/quic_protocol.cc35
3 files changed, 24 insertions, 20 deletions
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index de5f7cd..905f32c 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -50,6 +50,8 @@ const int kMaxResendPerAck = 10;
// TCP resends after 2 nacks. We allow for a third in case of out-of-order
// delivery.
+// TODO(ianswett): Change to match TCP's rule of resending once an ack at least
+// 3 sequence numbers larger arrives.
const int kNumberOfNacksBeforeResend = 3;
// The maxiumum number of packets we'd like to queue. We may end up queueing
diff --git a/net/quic/quic_connection.h b/net/quic/quic_connection.h
index 382f729..72abfd9 100644
--- a/net/quic/quic_connection.h
+++ b/net/quic/quic_connection.h
@@ -243,8 +243,8 @@ class NET_EXPORT_PRIVATE QuicConnection : public QuicFramerVisitorInterface {
void SetLeastUnacked(QuicPacketSequenceNumber least_unacked);
// Helper to update least unacked. If acked_sequence_number was not the least
- // unacked packet, this is a no-op. If it was the least least unacked packet,
- // This finds the new least unacked packet and updates the outgoing ack frame.
+ // unacked packet, this is a no-op. If it was the least unacked packet,
+ // this finds the new least unacked packet and updates the outgoing ack frame.
void UpdateLeastUnacked(QuicPacketSequenceNumber acked_sequence_number);
QuicConnectionHelperInterface* helper() { return helper_; }
@@ -271,7 +271,8 @@ class NET_EXPORT_PRIVATE QuicConnection : public QuicFramerVisitorInterface {
struct UnackedPacket {
explicit UnackedPacket(QuicPacket* packet)
- : packet(packet), number_nacks(0) {
+ : packet(packet),
+ number_nacks(0) {
}
QuicPacket* packet;
uint8 number_nacks;
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc
index 76e6298..6c770df 100644
--- a/net/quic/quic_protocol.cc
+++ b/net/quic/quic_protocol.cc
@@ -78,17 +78,17 @@ QuicAckFrame::QuicAckFrame(QuicPacketSequenceNumber largest_received,
sent_info.least_unacked = least_unacked;
}
-ostream& operator<<(ostream& os, const SentPacketInfo& s) {
- os << "least_waiting: " << s.least_unacked;
+ostream& operator<<(ostream& os, const SentPacketInfo& sent_info) {
+ os << "least_waiting: " << sent_info.least_unacked;
return os;
}
-ostream& operator<<(ostream& os, const ReceivedPacketInfo& r) {
+ostream& operator<<(ostream& os, const ReceivedPacketInfo& received_info) {
os << "largest_received: "
- << r.largest_received
+ << received_info.largest_received
<< " missing_packets: [ ";
- for (SequenceSet::const_iterator it = r.missing_packets.begin();
- it != r.missing_packets.end(); ++it) {
+ for (SequenceSet::const_iterator it = received_info.missing_packets.begin();
+ it != received_info.missing_packets.end(); ++it) {
os << *it << " ";
}
os << " ] ";
@@ -101,12 +101,13 @@ QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() {
QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {
}
-ostream& operator<<(ostream& os, const QuicCongestionFeedbackFrame& c) {
- os << "type: " << c.type;
- switch (c.type) {
+ostream& operator<<(ostream& os,
+ const QuicCongestionFeedbackFrame& congestion_frame) {
+ os << "type: " << congestion_frame.type;
+ switch (congestion_frame.type) {
case kInterArrival: {
const CongestionFeedbackMessageInterArrival& inter_arrival =
- c.inter_arrival;
+ congestion_frame.inter_arrival;
os << " accumulated_number_of_lost_packets: "
<< inter_arrival.accumulated_number_of_lost_packets;
os << " offset_time: " << inter_arrival.offset_time;
@@ -122,27 +123,27 @@ ostream& operator<<(ostream& os, const QuicCongestionFeedbackFrame& c) {
}
case kFixRate: {
os << " bitrate_in_bytes_per_second: "
- << c.fix_rate.bitrate_in_bytes_per_second;
+ << congestion_frame.fix_rate.bitrate_in_bytes_per_second;
break;
}
case kTCP: {
- const CongestionFeedbackMessageTCP& tcp = c.tcp;
+ const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp;
os << " accumulated_number_of_lost_packets: "
- << c.tcp.accumulated_number_of_lost_packets;
+ << congestion_frame.tcp.accumulated_number_of_lost_packets;
os << " receive_window: " << tcp.receive_window;
break;
}
default: {
DLOG(FATAL) << "Unsupported congestion info type: "
- << c.type;
+ << congestion_frame.type;
}
}
return os;
}
-ostream& operator<<(ostream& os, const QuicAckFrame& a) {
- os << "sent info { " << a.sent_info << " } "
- << "received info { " << a.received_info << " }\n";
+ostream& operator<<(ostream& os, const QuicAckFrame& ack_frame) {
+ os << "sent info { " << ack_frame.sent_info << " } "
+ << "received info { " << ack_frame.received_info << " }\n";
return os;
}