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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 case QUIC_VERSION_25: | 137 case QUIC_VERSION_25: |
138 return MakeQuicTag('Q', '0', '2', '5'); | 138 return MakeQuicTag('Q', '0', '2', '5'); |
139 case QUIC_VERSION_26: | 139 case QUIC_VERSION_26: |
140 return MakeQuicTag('Q', '0', '2', '6'); | 140 return MakeQuicTag('Q', '0', '2', '6'); |
141 case QUIC_VERSION_27: | 141 case QUIC_VERSION_27: |
142 return MakeQuicTag('Q', '0', '2', '7'); | 142 return MakeQuicTag('Q', '0', '2', '7'); |
143 case QUIC_VERSION_28: | 143 case QUIC_VERSION_28: |
144 return MakeQuicTag('Q', '0', '2', '8'); | 144 return MakeQuicTag('Q', '0', '2', '8'); |
145 case QUIC_VERSION_29: | 145 case QUIC_VERSION_29: |
146 return MakeQuicTag('Q', '0', '2', '9'); | 146 return MakeQuicTag('Q', '0', '2', '9'); |
| 147 case QUIC_VERSION_30: |
| 148 return MakeQuicTag('Q', '0', '3', '0'); |
147 default: | 149 default: |
148 // This shold be an ERROR because we should never attempt to convert an | 150 // This shold be an ERROR because we should never attempt to convert an |
149 // invalid QuicVersion to be written to the wire. | 151 // invalid QuicVersion to be written to the wire. |
150 LOG(ERROR) << "Unsupported QuicVersion: " << version; | 152 LOG(ERROR) << "Unsupported QuicVersion: " << version; |
151 return 0; | 153 return 0; |
152 } | 154 } |
153 } | 155 } |
154 | 156 |
155 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { | 157 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { |
156 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { | 158 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { |
(...skipping 11 matching lines...) Expand all Loading... |
168 case x: \ | 170 case x: \ |
169 return #x | 171 return #x |
170 | 172 |
171 string QuicVersionToString(const QuicVersion version) { | 173 string QuicVersionToString(const QuicVersion version) { |
172 switch (version) { | 174 switch (version) { |
173 RETURN_STRING_LITERAL(QUIC_VERSION_25); | 175 RETURN_STRING_LITERAL(QUIC_VERSION_25); |
174 RETURN_STRING_LITERAL(QUIC_VERSION_26); | 176 RETURN_STRING_LITERAL(QUIC_VERSION_26); |
175 RETURN_STRING_LITERAL(QUIC_VERSION_27); | 177 RETURN_STRING_LITERAL(QUIC_VERSION_27); |
176 RETURN_STRING_LITERAL(QUIC_VERSION_28); | 178 RETURN_STRING_LITERAL(QUIC_VERSION_28); |
177 RETURN_STRING_LITERAL(QUIC_VERSION_29); | 179 RETURN_STRING_LITERAL(QUIC_VERSION_29); |
| 180 RETURN_STRING_LITERAL(QUIC_VERSION_30); |
178 default: | 181 default: |
179 return "QUIC_VERSION_UNSUPPORTED"; | 182 return "QUIC_VERSION_UNSUPPORTED"; |
180 } | 183 } |
181 } | 184 } |
182 | 185 |
183 string QuicVersionVectorToString(const QuicVersionVector& versions) { | 186 string QuicVersionVectorToString(const QuicVersionVector& versions) { |
184 string result = ""; | 187 string result = ""; |
185 for (size_t i = 0; i < versions.size(); ++i) { | 188 for (size_t i = 0; i < versions.size(); ++i) { |
186 if (i != 0) { | 189 if (i != 0) { |
187 result.append(","); | 190 result.append(","); |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 sent_time(sent_time), | 840 sent_time(sent_time), |
838 transmission_type(transmission_type), | 841 transmission_type(transmission_type), |
839 in_flight(false), | 842 in_flight(false), |
840 is_unackable(false), | 843 is_unackable(false), |
841 is_fec_packet(is_fec_packet), | 844 is_fec_packet(is_fec_packet), |
842 all_transmissions(nullptr) {} | 845 all_transmissions(nullptr) {} |
843 | 846 |
844 TransmissionInfo::~TransmissionInfo() {} | 847 TransmissionInfo::~TransmissionInfo() {} |
845 | 848 |
846 } // namespace net | 849 } // namespace net |
OLD | NEW |