Index: net/quic/core/quic_error_codes.h |
diff --git a/net/quic/core/quic_error_codes.h b/net/quic/core/quic_error_codes.h |
index b409e6c7fdf2f75f44162f0f542a8abe4a6b374f..41968791193e44724ef1d13359ef59f9837bf26f 100644 |
--- a/net/quic/core/quic_error_codes.h |
+++ b/net/quic/core/quic_error_codes.h |
@@ -9,6 +9,8 @@ |
#include <limits> |
+#include "net/base/net_export.h" |
+ |
namespace net { |
enum QuicRstStreamErrorCode { |
@@ -53,10 +55,10 @@ enum QuicRstStreamErrorCode { |
// No error. Used as bound while iterating. |
QUIC_STREAM_LAST_ERROR, |
}; |
-// QUIC error codes are encoded to a single octet on-the-wire. |
+// QuicRstStreamErrorCode is encoded as a single octet on-the-wire. |
static_assert(static_cast<int>(QUIC_STREAM_LAST_ERROR) <= |
std::numeric_limits<uint8_t>::max(), |
- "QuicErrorCode exceeds single octet"); |
+ "QuicRstStreamErrorCode exceeds single octet"); |
// These values must remain stable as they are uploaded to UMA histograms. |
// To add a new error code, use the current value of QUIC_LAST_ERROR and |
@@ -275,6 +277,17 @@ enum QuicErrorCode { |
// No error. Used as bound while iterating. |
QUIC_LAST_ERROR = 97, |
}; |
+// QuicErrorCodes is encoded as a single octet on-the-wire. |
+static_assert(static_cast<int>(QUIC_LAST_ERROR) <= |
+ std::numeric_limits<uint8_t>::max(), |
+ "QuicErrorCode exceeds single octet"); |
+ |
+// Returns the name of the QuicRstStreamErrorCode as a char* |
+NET_EXPORT_PRIVATE const char* QuicRstStreamErrorCodeToString( |
+ QuicRstStreamErrorCode error); |
+ |
+// Returns the name of the QuicErrorCode as a char* |
+NET_EXPORT_PRIVATE const char* QuicErrorCodeToString(QuicErrorCode error); |
} // namespace net |