| 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/core/quic_utils.h" | 5 #include "net/quic/core/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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); | 196 RETURN_STRING_LITERAL(QUIC_STREAM_CANCELLED); |
| 197 RETURN_STRING_LITERAL(QUIC_RST_ACKNOWLEDGEMENT); | 197 RETURN_STRING_LITERAL(QUIC_RST_ACKNOWLEDGEMENT); |
| 198 RETURN_STRING_LITERAL(QUIC_REFUSED_STREAM); | 198 RETURN_STRING_LITERAL(QUIC_REFUSED_STREAM); |
| 199 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); | 199 RETURN_STRING_LITERAL(QUIC_STREAM_LAST_ERROR); |
| 200 RETURN_STRING_LITERAL(QUIC_INVALID_PROMISE_URL); | 200 RETURN_STRING_LITERAL(QUIC_INVALID_PROMISE_URL); |
| 201 RETURN_STRING_LITERAL(QUIC_UNAUTHORIZED_PROMISE_URL); | 201 RETURN_STRING_LITERAL(QUIC_UNAUTHORIZED_PROMISE_URL); |
| 202 RETURN_STRING_LITERAL(QUIC_DUPLICATE_PROMISE_URL); | 202 RETURN_STRING_LITERAL(QUIC_DUPLICATE_PROMISE_URL); |
| 203 RETURN_STRING_LITERAL(QUIC_PROMISE_VARY_MISMATCH); | 203 RETURN_STRING_LITERAL(QUIC_PROMISE_VARY_MISMATCH); |
| 204 RETURN_STRING_LITERAL(QUIC_INVALID_PROMISE_METHOD); | 204 RETURN_STRING_LITERAL(QUIC_INVALID_PROMISE_METHOD); |
| 205 RETURN_STRING_LITERAL(QUIC_PUSH_STREAM_TIMED_OUT); | 205 RETURN_STRING_LITERAL(QUIC_PUSH_STREAM_TIMED_OUT); |
| 206 RETURN_STRING_LITERAL(QUIC_HEADERS_TOO_LARGE); |
| 206 } | 207 } |
| 207 // Return a default value so that we return this when |error| doesn't match | 208 // Return a default value so that we return this when |error| doesn't match |
| 208 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream | 209 // any of the QuicRstStreamErrorCodes. This can happen when the RstStream |
| 209 // frame sent by the peer (attacker) has invalid error code. | 210 // frame sent by the peer (attacker) has invalid error code. |
| 210 return "INVALID_RST_STREAM_ERROR_CODE"; | 211 return "INVALID_RST_STREAM_ERROR_CODE"; |
| 211 } | 212 } |
| 212 | 213 |
| 213 // static | 214 // static |
| 214 const char* QuicUtils::ErrorToString(QuicErrorCode error) { | 215 const char* QuicUtils::ErrorToString(QuicErrorCode error) { |
| 215 switch (error) { | 216 switch (error) { |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 | 570 |
| 570 bytes_remaining -= line_bytes; | 571 bytes_remaining -= line_bytes; |
| 571 offset += line_bytes; | 572 offset += line_bytes; |
| 572 p += line_bytes; | 573 p += line_bytes; |
| 573 s += '\n'; | 574 s += '\n'; |
| 574 } | 575 } |
| 575 return s; | 576 return s; |
| 576 } | 577 } |
| 577 | 578 |
| 578 } // namespace net | 579 } // namespace net |
| OLD | NEW |