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

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

Issue 1413143004: Add new version QUIC_VERSION_29 in which streams honor RST_STREAM + NO_ERROR. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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_session_test.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_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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 QuicTag QuicVersionToQuicTag(const QuicVersion version) { 135 QuicTag QuicVersionToQuicTag(const QuicVersion version) {
136 switch (version) { 136 switch (version) {
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:
146 return MakeQuicTag('Q', '0', '2', '9');
145 default: 147 default:
146 // This shold be an ERROR because we should never attempt to convert an 148 // This shold be an ERROR because we should never attempt to convert an
147 // invalid QuicVersion to be written to the wire. 149 // invalid QuicVersion to be written to the wire.
148 LOG(ERROR) << "Unsupported QuicVersion: " << version; 150 LOG(ERROR) << "Unsupported QuicVersion: " << version;
149 return 0; 151 return 0;
150 } 152 }
151 } 153 }
152 154
153 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) { 155 QuicVersion QuicTagToQuicVersion(const QuicTag version_tag) {
154 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) { 156 for (size_t i = 0; i < arraysize(kSupportedQuicVersions); ++i) {
(...skipping 10 matching lines...) Expand all
165 #define RETURN_STRING_LITERAL(x) \ 167 #define RETURN_STRING_LITERAL(x) \
166 case x: \ 168 case x: \
167 return #x 169 return #x
168 170
169 string QuicVersionToString(const QuicVersion version) { 171 string QuicVersionToString(const QuicVersion version) {
170 switch (version) { 172 switch (version) {
171 RETURN_STRING_LITERAL(QUIC_VERSION_25); 173 RETURN_STRING_LITERAL(QUIC_VERSION_25);
172 RETURN_STRING_LITERAL(QUIC_VERSION_26); 174 RETURN_STRING_LITERAL(QUIC_VERSION_26);
173 RETURN_STRING_LITERAL(QUIC_VERSION_27); 175 RETURN_STRING_LITERAL(QUIC_VERSION_27);
174 RETURN_STRING_LITERAL(QUIC_VERSION_28); 176 RETURN_STRING_LITERAL(QUIC_VERSION_28);
177 RETURN_STRING_LITERAL(QUIC_VERSION_29);
175 default: 178 default:
176 return "QUIC_VERSION_UNSUPPORTED"; 179 return "QUIC_VERSION_UNSUPPORTED";
177 } 180 }
178 } 181 }
179 182
180 string QuicVersionVectorToString(const QuicVersionVector& versions) { 183 string QuicVersionVectorToString(const QuicVersionVector& versions) {
181 string result = ""; 184 string result = "";
182 for (size_t i = 0; i < versions.size(); ++i) { 185 for (size_t i = 0; i < versions.size(); ++i) {
183 if (i != 0) { 186 if (i != 0) {
184 result.append(","); 187 result.append(",");
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 sent_time(sent_time), 817 sent_time(sent_time),
815 transmission_type(transmission_type), 818 transmission_type(transmission_type),
816 in_flight(false), 819 in_flight(false),
817 is_unackable(false), 820 is_unackable(false),
818 is_fec_packet(is_fec_packet), 821 is_fec_packet(is_fec_packet),
819 all_transmissions(nullptr) {} 822 all_transmissions(nullptr) {}
820 823
821 TransmissionInfo::~TransmissionInfo() {} 824 TransmissionInfo::~TransmissionInfo() {}
822 825
823 } // namespace net 826 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698