Chromium Code Reviews| 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 REMOTING_PROTOCOL_ERROR_H_ | 5 #ifndef REMOTING_PROTOCOL_ERROR_H_ |
| 6 #define REMOTING_PROTOCOL_ERROR_H_ | 6 #define REMOTING_PROTOCOL_ERROR_H_ |
| 7 | 7 |
| 8 namespace remoting { | 8 namespace remoting { |
| 9 namespace protocol { | 9 namespace protocol { |
| 10 | 10 |
| 11 // The UI implementations maintain corresponding definitions of this | 11 // The UI implementations maintain corresponding definitions of this |
| 12 // enumeration in webapp/error.js and | 12 // enumeration in webapp/error.js and |
| 13 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. | 13 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. |
| 14 // Be sure to update these locations if you make any changes to the ordering. | 14 // Be sure to update these locations if you make any changes to the ordering. |
| 15 enum ErrorCode { | 15 enum ErrorCode { |
| 16 OK = 0, | 16 OK = 0, |
| 17 PEER_IS_OFFLINE, | 17 PEER_IS_OFFLINE, |
| 18 SESSION_REJECTED, | 18 SESSION_REJECTED, |
| 19 INCOMPATIBLE_PROTOCOL, | 19 INCOMPATIBLE_PROTOCOL, |
| 20 AUTHENTICATION_FAILED, | 20 AUTHENTICATION_FAILED, |
| 21 CHANNEL_CONNECTION_ERROR, | 21 CHANNEL_CONNECTION_ERROR, |
| 22 SIGNALING_ERROR, | 22 SIGNALING_ERROR, |
| 23 SIGNALING_TIMEOUT, | 23 SIGNALING_TIMEOUT, |
| 24 HOST_OVERLOAD, | 24 HOST_OVERLOAD, |
| 25 MAX_SESSION_LENGTH, | 25 MAX_SESSION_LENGTH, |
| 26 HOST_CONFIGURATION_ERROR, | 26 HOST_CONFIGURATION_ERROR, |
| 27 UNKNOWN_ERROR, | 27 UNKNOWN_ERROR, |
|
Sergey Ulanov
2016/05/20 00:07:05
please keep UNKNOWN_ERROR the last error in the li
| |
| 28 DOMAIN_MISMATCH, | |
|
Sergey Ulanov
2016/05/20 00:07:05
I don't think DOMAIN_MISMATCH is the best name her
| |
| 28 | 29 |
| 29 ERROR_CODE_MAX = UNKNOWN_ERROR, | 30 ERROR_CODE_MAX = DOMAIN_MISMATCH, |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 // Returns the literal string of |error|. | 33 // Returns the literal string of |error|. |
| 33 const char* ErrorCodeToString(ErrorCode error); | 34 const char* ErrorCodeToString(ErrorCode error); |
| 34 | 35 |
| 35 } // namespace protocol | 36 } // namespace protocol |
| 36 } // namespace remoting | 37 } // namespace remoting |
| 37 | 38 |
| 38 #endif // REMOTING_PROTOCOL_ERROR_H_ | 39 #endif // REMOTING_PROTOCOL_ERROR_H_ |
| OLD | NEW |