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

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

Issue 449273002: Along with sending the SCUP message, this CL includes small fixes which (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Trigger_QUIC_tracegraf_72571464
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 | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager.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_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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 case QUIC_VERSION_16: 162 case QUIC_VERSION_16:
163 return MakeQuicTag('Q', '0', '1', '6'); 163 return MakeQuicTag('Q', '0', '1', '6');
164 case QUIC_VERSION_18: 164 case QUIC_VERSION_18:
165 return MakeQuicTag('Q', '0', '1', '8'); 165 return MakeQuicTag('Q', '0', '1', '8');
166 case QUIC_VERSION_19: 166 case QUIC_VERSION_19:
167 return MakeQuicTag('Q', '0', '1', '9'); 167 return MakeQuicTag('Q', '0', '1', '9');
168 case QUIC_VERSION_20: 168 case QUIC_VERSION_20:
169 return MakeQuicTag('Q', '0', '2', '0'); 169 return MakeQuicTag('Q', '0', '2', '0');
170 case QUIC_VERSION_21: 170 case QUIC_VERSION_21:
171 return MakeQuicTag('Q', '0', '2', '1'); 171 return MakeQuicTag('Q', '0', '2', '1');
172 case QUIC_VERSION_22:
173 return MakeQuicTag('Q', '0', '2', '2');
172 default: 174 default:
173 // This shold be an ERROR because we should never attempt to convert an 175 // This shold be an ERROR because we should never attempt to convert an
174 // invalid QuicVersion to be written to the wire. 176 // invalid QuicVersion to be written to the wire.
175 LOG(ERROR) << "Unsupported QuicVersion: " << version; 177 LOG(ERROR) << "Unsupported QuicVersion: " << version;
176 return 0; 178 return 0;
177 } 179 }
178 } 180 }
179 181
180 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { 182 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) {
181 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { 183 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) {
(...skipping 11 matching lines...) Expand all
193 case x: \ 195 case x: \
194 return #x 196 return #x
195 197
196 string QuicVersionToString(const QuicVersion version) { 198 string QuicVersionToString(const QuicVersion version) {
197 switch (version) { 199 switch (version) {
198 RETURN_STRING_LITERAL(QUIC_VERSION_16); 200 RETURN_STRING_LITERAL(QUIC_VERSION_16);
199 RETURN_STRING_LITERAL(QUIC_VERSION_18); 201 RETURN_STRING_LITERAL(QUIC_VERSION_18);
200 RETURN_STRING_LITERAL(QUIC_VERSION_19); 202 RETURN_STRING_LITERAL(QUIC_VERSION_19);
201 RETURN_STRING_LITERAL(QUIC_VERSION_20); 203 RETURN_STRING_LITERAL(QUIC_VERSION_20);
202 RETURN_STRING_LITERAL(QUIC_VERSION_21); 204 RETURN_STRING_LITERAL(QUIC_VERSION_21);
205 RETURN_STRING_LITERAL(QUIC_VERSION_22);
203 default: 206 default:
204 return "QUIC_VERSION_UNSUPPORTED"; 207 return "QUIC_VERSION_UNSUPPORTED";
205 } 208 }
206 } 209 }
207 210
208 string QuicVersionVectorToString(const QuicVersionVector& versions) { 211 string QuicVersionVectorToString(const QuicVersionVector& versions) {
209 string result = ""; 212 string result = "";
210 for (size_t i = 0; i < versions.size(); ++i) { 213 for (size_t i = 0; i < versions.size(); ++i) {
211 if (i != 0) { 214 if (i != 0) {
212 result.append(","); 215 result.append(",");
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 sent_time(QuicTime::Zero()), 763 sent_time(QuicTime::Zero()),
761 bytes_sent(0), 764 bytes_sent(0),
762 nack_count(0), 765 nack_count(0),
763 transmission_type(transmission_type), 766 transmission_type(transmission_type),
764 all_transmissions(all_transmissions), 767 all_transmissions(all_transmissions),
765 in_flight(false) { 768 in_flight(false) {
766 all_transmissions->insert(sequence_number); 769 all_transmissions->insert(sequence_number);
767 } 770 }
768 771
769 } // namespace net 772 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698