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 #include <string> | |
| 9 | |
| 10 #include "remoting/protocol/name_value_map.h" | |
|
Sergey Ulanov
2016/06/03 08:43:22
Don't need this include
Hzj_jie
2016/06/03 21:46:33
Done.
| |
| 11 | |
| 8 namespace remoting { | 12 namespace remoting { |
| 9 namespace protocol { | 13 namespace protocol { |
| 10 | 14 |
| 11 // The UI implementations maintain corresponding definitions of this | 15 // The UI implementations maintain corresponding definitions of this |
| 12 // enumeration in webapp/error.js and | 16 // enumeration in webapp/error.js and |
| 13 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. | 17 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. |
| 14 // Be sure to update these locations if you make any changes to the ordering. | 18 // Be sure to update these locations if you make any changes to the ordering. |
|
Sergey Ulanov
2016/06/03 08:43:22
Please update this comment to mention that error.c
Hzj_jie
2016/06/03 21:46:33
Done.
And other locations are not accurate, I have
| |
| 15 enum ErrorCode { | 19 enum ErrorCode { |
| 16 OK = 0, | 20 OK = 0, |
| 17 PEER_IS_OFFLINE, | 21 PEER_IS_OFFLINE, |
| 18 SESSION_REJECTED, | 22 SESSION_REJECTED, |
| 19 INCOMPATIBLE_PROTOCOL, | 23 INCOMPATIBLE_PROTOCOL, |
| 20 AUTHENTICATION_FAILED, | 24 AUTHENTICATION_FAILED, |
| 21 INVALID_ACCOUNT, | 25 INVALID_ACCOUNT, |
| 22 CHANNEL_CONNECTION_ERROR, | 26 CHANNEL_CONNECTION_ERROR, |
| 23 SIGNALING_ERROR, | 27 SIGNALING_ERROR, |
| 24 SIGNALING_TIMEOUT, | 28 SIGNALING_TIMEOUT, |
| 25 HOST_OVERLOAD, | 29 HOST_OVERLOAD, |
| 26 MAX_SESSION_LENGTH, | 30 MAX_SESSION_LENGTH, |
| 27 HOST_CONFIGURATION_ERROR, | 31 HOST_CONFIGURATION_ERROR, |
| 28 UNKNOWN_ERROR, | 32 UNKNOWN_ERROR, |
| 29 | 33 |
| 30 ERROR_CODE_MAX = UNKNOWN_ERROR, | 34 ERROR_CODE_MAX = UNKNOWN_ERROR, |
| 31 }; | 35 }; |
| 32 | 36 |
| 37 bool ParseErrorCode(const std::string& name, ErrorCode* result); | |
| 38 | |
| 33 // Returns the literal string of |error|. | 39 // Returns the literal string of |error|. |
| 34 const char* ErrorCodeToString(ErrorCode error); | 40 const char* ErrorCodeToString(ErrorCode error); |
| 35 | 41 |
| 36 } // namespace protocol | 42 } // namespace protocol |
| 37 } // namespace remoting | 43 } // namespace remoting |
| 38 | 44 |
| 39 #endif // REMOTING_PROTOCOL_ERROR_H_ | 45 #endif // REMOTING_PROTOCOL_ERROR_H_ |
| OLD | NEW |