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

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

Issue 447093004: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed indenation in QuicFramer.cc 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 | « net/quic/quic_protocol.h ('k') | net/quic/reliable_quic_stream.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_protocol.h" 5 #include "net/quic/quic_protocol.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
9 9
10 using base::StringPiece; 10 using base::StringPiece;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 largest_observed(0), 264 largest_observed(0),
265 delta_time_largest_observed(QuicTime::Delta::Infinite()), 265 delta_time_largest_observed(QuicTime::Delta::Infinite()),
266 is_truncated(false) {} 266 is_truncated(false) {}
267 267
268 QuicAckFrame::~QuicAckFrame() {} 268 QuicAckFrame::~QuicAckFrame() {}
269 269
270 CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP() 270 CongestionFeedbackMessageTCP::CongestionFeedbackMessageTCP()
271 : receive_window(0) { 271 : receive_window(0) {
272 } 272 }
273 273
274 CongestionFeedbackMessageInterArrival::CongestionFeedbackMessageInterArrival() { 274 CongestionFeedbackMessageTimestamp::CongestionFeedbackMessageTimestamp() {
275 } 275 }
276 276
277 CongestionFeedbackMessageInterArrival:: 277 CongestionFeedbackMessageTimestamp::~CongestionFeedbackMessageTimestamp() {}
278 ~CongestionFeedbackMessageInterArrival() {}
279 278
280 QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP) {} 279 QuicCongestionFeedbackFrame::QuicCongestionFeedbackFrame() : type(kTCP) {}
281 280
282 QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {} 281 QuicCongestionFeedbackFrame::~QuicCongestionFeedbackFrame() {}
283 282
284 QuicRstStreamErrorCode AdjustErrorForVersion( 283 QuicRstStreamErrorCode AdjustErrorForVersion(
285 QuicRstStreamErrorCode error_code, 284 QuicRstStreamErrorCode error_code,
286 QuicVersion version) { 285 QuicVersion version) {
287 switch (error_code) { 286 switch (error_code) {
288 case QUIC_RST_FLOW_CONTROL_ACCOUNTING: 287 case QUIC_RST_FLOW_CONTROL_ACCOUNTING:
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 << "data { " 494 << "data { "
496 << QuicUtils::StringToHexASCIIDump(*(stream_frame.GetDataAsString())) 495 << QuicUtils::StringToHexASCIIDump(*(stream_frame.GetDataAsString()))
497 << " }\n"; 496 << " }\n";
498 return os; 497 return os;
499 } 498 }
500 499
501 ostream& operator<<(ostream& os, 500 ostream& operator<<(ostream& os,
502 const QuicCongestionFeedbackFrame& congestion_frame) { 501 const QuicCongestionFeedbackFrame& congestion_frame) {
503 os << "type: " << congestion_frame.type; 502 os << "type: " << congestion_frame.type;
504 switch (congestion_frame.type) { 503 switch (congestion_frame.type) {
505 case kInterArrival: { 504 case kTimestamp: {
506 const CongestionFeedbackMessageInterArrival& inter_arrival = 505 const CongestionFeedbackMessageTimestamp& timestamp =
507 congestion_frame.inter_arrival; 506 congestion_frame.timestamp;
508 os << " received packets: [ "; 507 os << " received packets: [ ";
509 for (TimeMap::const_iterator it = 508 for (TimeMap::const_iterator it = timestamp.received_packet_times.begin();
510 inter_arrival.received_packet_times.begin(); 509 it != timestamp.received_packet_times.end(); ++it) {
511 it != inter_arrival.received_packet_times.end(); ++it) {
512 os << it->first << "@" << it->second.ToDebuggingValue() << " "; 510 os << it->first << "@" << it->second.ToDebuggingValue() << " ";
513 } 511 }
514 os << "]"; 512 os << "]";
515 break; 513 break;
516 } 514 }
517 case kTCP: { 515 case kTCP: {
518 const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp; 516 const CongestionFeedbackMessageTCP& tcp = congestion_frame.tcp;
519 os << " receive_window: " << tcp.receive_window; 517 os << " receive_window: " << tcp.receive_window;
520 break; 518 break;
521 } 519 }
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 sent_time(QuicTime::Zero()), 760 sent_time(QuicTime::Zero()),
763 bytes_sent(0), 761 bytes_sent(0),
764 nack_count(0), 762 nack_count(0),
765 transmission_type(transmission_type), 763 transmission_type(transmission_type),
766 all_transmissions(all_transmissions), 764 all_transmissions(all_transmissions),
767 in_flight(false) { 765 in_flight(false) {
768 all_transmissions->insert(sequence_number); 766 all_transmissions->insert(sequence_number);
769 } 767 }
770 768
771 } // namespace net 769 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698