Chromium Code Reviews| Index: chrome/browser/resources/net_internals/main.js |
| diff --git a/chrome/browser/resources/net_internals/main.js b/chrome/browser/resources/net_internals/main.js |
| index 22221aebd883d3fbea40c698f15cf2131a14c6f4..f46b7de98eba19b497f9d9ba2041ce4698e233b3 100644 |
| --- a/chrome/browser/resources/net_internals/main.js |
| +++ b/chrome/browser/resources/net_internals/main.js |
| @@ -15,6 +15,8 @@ var EventSourceTypeNames = null; |
| var LogLevelType = null; |
| var ClientInfo = null; |
| var NetError = null; |
| +var QuicError = null; |
| +var QuicRstStreamError = null; |
| var LoadFlag = null; |
| var LoadState = null; |
| var AddressFamily = null; |
| @@ -301,6 +303,8 @@ ConstantsObserver.prototype.onReceivedConstants = function(receivedConstants) { |
| ClientInfo = Constants.clientInfo; |
| LoadFlag = Constants.loadFlag; |
| NetError = Constants.netError; |
| + QuicError = Constants.quicError; |
| + QuicRstStreamError = Constants.quicRstStreamError; |
| AddressFamily = Constants.addressFamily; |
| LoadState = Constants.loadState; |
| @@ -342,6 +346,30 @@ function netErrorToString(netError) { |
| } |
| /** |
| + * Returns the name for quicError. |
| + * |
| + * Example: quicErrorToString(25) would return |
|
eroman
2013/06/17 23:18:19
not: "would" may be too strong if the C++ code eve
Ryan Hamilton
2013/06/18 19:23:57
Heh, I simply copied the language from netErrorToS
|
| + * "TIMED_OUT". |
| + * @param {number} quicError The QUIC error code. |
| + * @return {string} The name of the given error. |
| + */ |
| +function quicErrorToString(quicError) { |
| + return getKeyWithValue(QuicError, quicError); |
| +} |
| + |
| +/** |
| + * Returns the name for quicRstStreamError. |
| + * |
| + * Example: quicRstStreamErrorToString(3) would return |
|
eroman
2013/06/17 23:18:19
Same comment as above.
|
| + * "BAD_APPLICATION_PAYLOAD". |
| + * @param {number} quicRstStreamError The QUIC RST_STREAM error code. |
| + * @return {string} The name of the given error. |
| + */ |
| +function quicRstStreamErrorToString(quicRstStreamError) { |
| + return getKeyWithValue(QuicRstStreamError, quicRstStreamError); |
| +} |
| + |
| +/** |
| * Returns a string representation of |family|. |
| * @param {number} family An AddressFamily |
| * @return {string} A representation of the given family. |