| OLD | NEW |
| 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_flags.h" | 8 #include "net/quic/quic_flags.h" |
| 9 #include "net/quic/quic_utils.h" | 9 #include "net/quic/quic_utils.h" |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 case QUIC_VERSION_26: | 193 case QUIC_VERSION_26: |
| 194 return MakeQuicTag('Q', '0', '2', '6'); | 194 return MakeQuicTag('Q', '0', '2', '6'); |
| 195 case QUIC_VERSION_27: | 195 case QUIC_VERSION_27: |
| 196 return MakeQuicTag('Q', '0', '2', '7'); | 196 return MakeQuicTag('Q', '0', '2', '7'); |
| 197 case QUIC_VERSION_28: | 197 case QUIC_VERSION_28: |
| 198 return MakeQuicTag('Q', '0', '2', '8'); | 198 return MakeQuicTag('Q', '0', '2', '8'); |
| 199 case QUIC_VERSION_29: | 199 case QUIC_VERSION_29: |
| 200 return MakeQuicTag('Q', '0', '2', '9'); | 200 return MakeQuicTag('Q', '0', '2', '9'); |
| 201 case QUIC_VERSION_30: | 201 case QUIC_VERSION_30: |
| 202 return MakeQuicTag('Q', '0', '3', '0'); | 202 return MakeQuicTag('Q', '0', '3', '0'); |
| 203 case QUIC_VERSION_31: |
| 204 return MakeQuicTag('Q', '0', '3', '1'); |
| 203 default: | 205 default: |
| 204 // This shold be an ERROR because we should never attempt to convert an | 206 // This shold be an ERROR because we should never attempt to convert an |
| 205 // invalid QuicVersion to be written to the wire. | 207 // invalid QuicVersion to be written to the wire. |
| 206 LOG(ERROR) << "Unsupported QuicVersion: " << version; | 208 LOG(ERROR) << "Unsupported QuicVersion: " << version; |
| 207 return 0; | 209 return 0; |
| 208 } | 210 } |
| 209 } | 211 } |
| 210 | 212 |
| 211 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { | 213 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { |
| 212 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { | 214 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 225 return #x | 227 return #x |
| 226 | 228 |
| 227 string QuicVersionToString(const QuicVersion version) { | 229 string QuicVersionToString(const QuicVersion version) { |
| 228 switch (version) { | 230 switch (version) { |
| 229 RETURN_STRING_LITERAL(QUIC_VERSION_25); | 231 RETURN_STRING_LITERAL(QUIC_VERSION_25); |
| 230 RETURN_STRING_LITERAL(QUIC_VERSION_26); | 232 RETURN_STRING_LITERAL(QUIC_VERSION_26); |
| 231 RETURN_STRING_LITERAL(QUIC_VERSION_27); | 233 RETURN_STRING_LITERAL(QUIC_VERSION_27); |
| 232 RETURN_STRING_LITERAL(QUIC_VERSION_28); | 234 RETURN_STRING_LITERAL(QUIC_VERSION_28); |
| 233 RETURN_STRING_LITERAL(QUIC_VERSION_29); | 235 RETURN_STRING_LITERAL(QUIC_VERSION_29); |
| 234 RETURN_STRING_LITERAL(QUIC_VERSION_30); | 236 RETURN_STRING_LITERAL(QUIC_VERSION_30); |
| 237 RETURN_STRING_LITERAL(QUIC_VERSION_31); |
| 235 default: | 238 default: |
| 236 return "QUIC_VERSION_UNSUPPORTED"; | 239 return "QUIC_VERSION_UNSUPPORTED"; |
| 237 } | 240 } |
| 238 } | 241 } |
| 239 | 242 |
| 240 string QuicVersionVectorToString(const QuicVersionVector& versions) { | 243 string QuicVersionVectorToString(const QuicVersionVector& versions) { |
| 241 string result = ""; | 244 string result = ""; |
| 242 for (size_t i = 0; i < versions.size(); ++i) { | 245 for (size_t i = 0; i < versions.size(); ++i) { |
| 243 if (i != 0) { | 246 if (i != 0) { |
| 244 result.append(","); | 247 result.append(","); |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 is_fec_packet(is_fec_packet), | 808 is_fec_packet(is_fec_packet), |
| 806 has_crypto_handshake(has_crypto_handshake), | 809 has_crypto_handshake(has_crypto_handshake), |
| 807 needs_padding(needs_padding), | 810 needs_padding(needs_padding), |
| 808 retransmission(0) {} | 811 retransmission(0) {} |
| 809 | 812 |
| 810 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; | 813 TransmissionInfo::TransmissionInfo(const TransmissionInfo& other) = default; |
| 811 | 814 |
| 812 TransmissionInfo::~TransmissionInfo() {} | 815 TransmissionInfo::~TransmissionInfo() {} |
| 813 | 816 |
| 814 } // namespace net | 817 } // namespace net |
| OLD | NEW |