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_RST_ACKNOWLEDGEMENT); |
142 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); | 142 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); |
143 } | 143 } |
144 // 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 |
145 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream | 145 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream |
146 // frame sent by the peer (attacker) has invalid error code. | 146 // frame sent by the peer (attacker) has invalid error code. |
147 return "INVALID_RST_STREAM_ERROR_CODE"; | 147 return "INVALID_RST_STREAM_ERROR_CODE"; |
148 } | 148 } |
149 | 149 |
150 // static | 150 // static |
151 const char* QuicUtils::ErrorToString(QuicErrorCode error) { | 151 const char* QuicUtils::ErrorToString(QuicErrorCode error) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 QuicPriority QuicUtils::LowestPriority() { | 315 QuicPriority QuicUtils::LowestPriority() { |
316 return QuicWriteBlockedList::kLowestPriority; | 316 return QuicWriteBlockedList::kLowestPriority; |
317 } | 317 } |
318 | 318 |
319 // static | 319 // static |
320 QuicPriority QuicUtils::HighestPriority() { | 320 QuicPriority QuicUtils::HighestPriority() { |
321 return QuicWriteBlockedList::kHighestPriority; | 321 return QuicWriteBlockedList::kHighestPriority; |
322 } | 322 } |
323 | 323 |
324 } // namespace net | 324 } // namespace net |
OLD | NEW |