| 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 #ifndef NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ | 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ |
| 6 #define NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ | 6 #define NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ |
| 7 | 7 |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "net/base/net_export.h" |
| 9 | 10 |
| 10 namespace net { | 11 namespace net { |
| 11 | 12 |
| 12 // Reason codes used with close messages. NoStatusReceived, | 13 // Reason codes used with close messages. NoStatusReceived, |
| 13 // AbnormalClosure and TlsHandshake are special in that they | 14 // AbnormalClosure and TlsHandshake are special in that they |
| 14 // should never be sent on the wire; they are only used within the | 15 // should never be sent on the wire; they are only used within the |
| 15 // implementation. | 16 // implementation. |
| 16 enum WebSocketError { | 17 enum WebSocketError { |
| 17 // Status codes in the range 0 to 999 are not used. | 18 // Status codes in the range 0 to 999 are not used. |
| 18 | 19 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 44 kWebSocketErrorPrivateReservedMin = 4000, | 45 kWebSocketErrorPrivateReservedMin = 4000, |
| 45 kWebSocketErrorPrivateReservedMax = 4999, | 46 kWebSocketErrorPrivateReservedMax = 4999, |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 // Convert WebSocketError to net::Error defined in net/base/net_errors.h. | 49 // Convert WebSocketError to net::Error defined in net/base/net_errors.h. |
| 49 NET_EXPORT_PRIVATE Error WebSocketErrorToNetError(WebSocketError error); | 50 NET_EXPORT_PRIVATE Error WebSocketErrorToNetError(WebSocketError error); |
| 50 | 51 |
| 51 } // namespace net | 52 } // namespace net |
| 52 | 53 |
| 53 #endif // NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ | 54 #endif // NET_WEBSOCKETS_WEBSOCKET_ERRORS_H_ |
| OLD | NEW |