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_utils.h" | 5 #include "net/quic/quic_utils.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) { | 139 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) { |
140 switch (error) { | 140 switch (error) { |
141 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR); | 141 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR); |
142 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR); | 142 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR); |
143 RETURN_STRING_LITERAL(QUIC_ERROR_PROCESSING_STREAM); | 143 RETURN_STRING_LITERAL(QUIC_ERROR_PROCESSING_STREAM); |
144 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS); | 144 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS); |
145 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD); | 145 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD); |
146 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY); | 146 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY); |
147 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); | 147 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); |
148 RETURN_STRING_LITERAL(QUIC_RST_ACKNOWLEDGEMENT); | 148 RETURN_STRING_LITERAL(QUIC_RST_ACKNOWLEDGEMENT); |
| 149 RETURN_STRING_LITERAL(QUIC_REFUSED_STREAM); |
149 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); | 150 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); |
150 } | 151 } |
151 // Return a default value so that we return this when |error| doesn't match | 152 // Return a default value so that we return this when |error| doesn't match |
152 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream | 153 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream |
153 // frame sent by the peer (attacker) has invalid error code. | 154 // frame sent by the peer (attacker) has invalid error code. |
154 return "INVALID_RST_STREAM_ERROR_CODE"; | 155 return "INVALID_RST_STREAM_ERROR_CODE"; |
155 } | 156 } |
156 | 157 |
157 // static | 158 // static |
158 const char* QuicUtils::ErrorToString(QuicErrorCode error) { | 159 const char* QuicUtils::ErrorToString(QuicErrorCode error) { |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 343 } |
343 return s; | 344 return s; |
344 } | 345 } |
345 | 346 |
346 // static | 347 // static |
347 QuicPriority QuicUtils::HighestPriority() { | 348 QuicPriority QuicUtils::HighestPriority() { |
348 return QuicWriteBlockedList::kHighestPriority; | 349 return QuicWriteBlockedList::kHighestPriority; |
349 } | 350 } |
350 | 351 |
351 } // namespace net | 352 } // namespace net |
OLD | NEW |