| 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 RETURN_STRING_LITERAL(QUIC_TIMEOUTS_WITH_OPEN_STREAMS); | 289 RETURN_STRING_LITERAL(QUIC_TIMEOUTS_WITH_OPEN_STREAMS); |
| 290 RETURN_STRING_LITERAL(QUIC_FAILED_TO_SERIALIZE_PACKET); | 290 RETURN_STRING_LITERAL(QUIC_FAILED_TO_SERIALIZE_PACKET); |
| 291 RETURN_STRING_LITERAL(QUIC_TOO_MANY_AVAILABLE_STREAMS); | 291 RETURN_STRING_LITERAL(QUIC_TOO_MANY_AVAILABLE_STREAMS); |
| 292 RETURN_STRING_LITERAL(QUIC_UNENCRYPTED_FEC_DATA); | 292 RETURN_STRING_LITERAL(QUIC_UNENCRYPTED_FEC_DATA); |
| 293 RETURN_STRING_LITERAL(QUIC_BAD_MULTIPATH_FLAG); | 293 RETURN_STRING_LITERAL(QUIC_BAD_MULTIPATH_FLAG); |
| 294 RETURN_STRING_LITERAL(QUIC_IP_ADDRESS_CHANGED); | 294 RETURN_STRING_LITERAL(QUIC_IP_ADDRESS_CHANGED); |
| 295 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS); | 295 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS); |
| 296 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES); | 296 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES); |
| 297 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK); | 297 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK); |
| 298 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM); | 298 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM); |
| 299 RETURN_STRING_LITERAL(QUIC_CONNECTION_MIGRATION_DISABLED); |
| 299 RETURN_STRING_LITERAL(QUIC_TOO_MANY_RTOS); | 300 RETURN_STRING_LITERAL(QUIC_TOO_MANY_RTOS); |
| 300 RETURN_STRING_LITERAL(QUIC_LAST_ERROR); | 301 RETURN_STRING_LITERAL(QUIC_LAST_ERROR); |
| 301 // Intentionally have no default case, so we'll break the build | 302 // Intentionally have no default case, so we'll break the build |
| 302 // if we add errors and don't put them here. | 303 // if we add errors and don't put them here. |
| 303 } | 304 } |
| 304 // Return a default value so that we return this when |error| doesn't match | 305 // Return a default value so that we return this when |error| doesn't match |
| 305 // any of the QuicErrorCodes. This can happen when the ConnectionClose | 306 // any of the QuicErrorCodes. This can happen when the ConnectionClose |
| 306 // frame sent by the peer (attacker) has invalid error code. | 307 // frame sent by the peer (attacker) has invalid error code. |
| 307 return "INVALID_ERROR_CODE"; | 308 return "INVALID_ERROR_CODE"; |
| 308 } | 309 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 24)) { | 525 24)) { |
| 525 // Subnet part does not change (here, we use /24), which is considered to be | 526 // Subnet part does not change (here, we use /24), which is considered to be |
| 526 // caused by NATs. | 527 // caused by NATs. |
| 527 return IPV4_SUBNET_CHANGE; | 528 return IPV4_SUBNET_CHANGE; |
| 528 } | 529 } |
| 529 | 530 |
| 530 return UNSPECIFIED_CHANGE; | 531 return UNSPECIFIED_CHANGE; |
| 531 } | 532 } |
| 532 | 533 |
| 533 } // namespace net | 534 } // namespace net |
| OLD | NEW |