Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: net/quic/quic_protocol.h

Issue 1664763003: Rename QUIC connection timeout error codes to be more descriptive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113275797
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 // Because receiving an unknown QuicRstStreamErrorCode results in connection 486 // Because receiving an unknown QuicRstStreamErrorCode results in connection
487 // teardown, we use this to make sure any errors predating a given version are 487 // teardown, we use this to make sure any errors predating a given version are
488 // downgraded to the most appropriate existing error. 488 // downgraded to the most appropriate existing error.
489 NET_EXPORT_PRIVATE QuicRstStreamErrorCode 489 NET_EXPORT_PRIVATE QuicRstStreamErrorCode
490 AdjustErrorForVersion(QuicRstStreamErrorCode error_code, QuicVersion version); 490 AdjustErrorForVersion(QuicRstStreamErrorCode error_code, QuicVersion version);
491 491
492 // These values must remain stable as they are uploaded to UMA histograms. 492 // These values must remain stable as they are uploaded to UMA histograms.
493 // To add a new error code, use the current value of QUIC_LAST_ERROR and 493 // To add a new error code, use the current value of QUIC_LAST_ERROR and
494 // increment QUIC_LAST_ERROR. 494 // increment QUIC_LAST_ERROR.
495 // last value = 80
496 enum QuicErrorCode { 495 enum QuicErrorCode {
497 QUIC_NO_ERROR = 0, 496 QUIC_NO_ERROR = 0,
498 497
499 // Connection has reached an invalid state. 498 // Connection has reached an invalid state.
500 QUIC_INTERNAL_ERROR = 1, 499 QUIC_INTERNAL_ERROR = 1,
501 // There were data frames after the a fin or reset. 500 // There were data frames after the a fin or reset.
502 QUIC_STREAM_DATA_AFTER_TERMINATION = 2, 501 QUIC_STREAM_DATA_AFTER_TERMINATION = 2,
503 // Control frame is malformed. 502 // Control frame is malformed.
504 QUIC_INVALID_PACKET_HEADER = 3, 503 QUIC_INVALID_PACKET_HEADER = 3,
505 // Frame data is malformed. 504 // Frame data is malformed.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 QUIC_PUBLIC_RESET = 19, 554 QUIC_PUBLIC_RESET = 19,
556 // Invalid protocol version. 555 // Invalid protocol version.
557 QUIC_INVALID_VERSION = 20, 556 QUIC_INVALID_VERSION = 20,
558 557
559 // The Header ID for a stream was too far from the previous. 558 // The Header ID for a stream was too far from the previous.
560 QUIC_INVALID_HEADER_ID = 22, 559 QUIC_INVALID_HEADER_ID = 22,
561 // Negotiable parameter received during handshake had invalid value. 560 // Negotiable parameter received during handshake had invalid value.
562 QUIC_INVALID_NEGOTIATED_VALUE = 23, 561 QUIC_INVALID_NEGOTIATED_VALUE = 23,
563 // There was an error decompressing data. 562 // There was an error decompressing data.
564 QUIC_DECOMPRESSION_FAILURE = 24, 563 QUIC_DECOMPRESSION_FAILURE = 24,
565 // We hit our prenegotiated (or default) timeout 564 // The connection timed out due to no network activity.
566 QUIC_CONNECTION_TIMED_OUT = 25, 565 QUIC_NETWORK_IDLE_TIMEOUT = 25,
567 // We hit our overall connection timeout 566 // The connection timed out waiting for the handshake to complete.
568 QUIC_CONNECTION_OVERALL_TIMED_OUT = 67, 567 QUIC_HANDSHAKE_TIMEOUT = 67,
569 // There was an error encountered migrating addresses 568 // There was an error encountered migrating addresses
570 QUIC_ERROR_MIGRATING_ADDRESS = 26, 569 QUIC_ERROR_MIGRATING_ADDRESS = 26,
571 // There was an error while writing to the socket. 570 // There was an error while writing to the socket.
572 QUIC_PACKET_WRITE_ERROR = 27, 571 QUIC_PACKET_WRITE_ERROR = 27,
573 // There was an error while reading from the socket. 572 // There was an error while reading from the socket.
574 QUIC_PACKET_READ_ERROR = 51, 573 QUIC_PACKET_READ_ERROR = 51,
575 // We received a STREAM_FRAME with no data and no fin flag set. 574 // We received a STREAM_FRAME with no data and no fin flag set.
576 QUIC_INVALID_STREAM_FRAME = 50, 575 QUIC_INVALID_STREAM_FRAME = 50,
577 // We received invalid data on the headers stream. 576 // We received invalid data on the headers stream.
578 QUIC_INVALID_HEADERS_STREAM_DATA = 56, 577 QUIC_INVALID_HEADERS_STREAM_DATA = 56,
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1397 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1399 1398
1400 const struct iovec* iov; 1399 const struct iovec* iov;
1401 const int iov_count; 1400 const int iov_count;
1402 const size_t total_length; 1401 const size_t total_length;
1403 }; 1402 };
1404 1403
1405 } // namespace net 1404 } // namespace net
1406 1405
1407 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1406 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698