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 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // static | 131 // static |
132 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) { | 132 const char* QuicUtils::StreamErrorToString(QuicRstStreamErrorCode error) { |
133 switch (error) { | 133 switch (error) { |
134 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR); | 134 RETURN_STRING_LITERAL(QUIC_STREAM_NO_ERROR); |
135 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR); | 135 RETURN_STRING_LITERAL(QUIC_STREAM_CONNECTION_ERROR); |
136 RETURN_STRING_LITERAL(QUIC_ERROR_PROCESSING_STREAM); | 136 RETURN_STRING_LITERAL(QUIC_ERROR_PROCESSING_STREAM); |
137 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS); | 137 RETURN_STRING_LITERAL(QUIC_MULTIPLE_TERMINATION_OFFSETS); |
138 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD); | 138 RETURN_STRING_LITERAL(QUIC_BAD_APPLICATION_PAYLOAD); |
139 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY); | 139 RETURN_STRING_LITERAL(QUIC_STREAM_PEER_GOING_AWAY); |
140 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); | 140 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); |
| 141 RETURN_STRING_LITERAL(QUIC_RST_FLOW_CONTROL_ACCOUNTING); |
141 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); | 142 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); |
142 } | 143 } |
143 // Return a default value so that we return this when |error| doesn't match | 144 // Return a default value so that we return this when |error| doesn't match |
144 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream | 145 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream |
145 // frame sent by the peer (attacker) has invalid error code. | 146 // frame sent by the peer (attacker) has invalid error code. |
146 return "INVALID_RST_STREAM_ERROR_CODE"; | 147 return "INVALID_RST_STREAM_ERROR_CODE"; |
147 } | 148 } |
148 | 149 |
149 // static | 150 // static |
150 const char* QuicUtils::ErrorToString(QuicErrorCode error) { | 151 const char* QuicUtils::ErrorToString(QuicErrorCode error) { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 QuicPriority QuicUtils::LowestPriority() { | 305 QuicPriority QuicUtils::LowestPriority() { |
305 return QuicWriteBlockedList::kLowestPriority; | 306 return QuicWriteBlockedList::kLowestPriority; |
306 } | 307 } |
307 | 308 |
308 // static | 309 // static |
309 QuicPriority QuicUtils::HighestPriority() { | 310 QuicPriority QuicUtils::HighestPriority() { |
310 return QuicWriteBlockedList::kHighestPriority; | 311 return QuicWriteBlockedList::kHighestPriority; |
311 } | 312 } |
312 | 313 |
313 } // namespace net | 314 } // namespace net |
OLD | NEW |