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 "base/logging.h" | |
|
Sergey Ulanov
2015/07/30 22:00:44
nit: don't need this include.
tonychun
2015/07/30 23:20:27
Removed.
| |
| 9 | |
| 8 namespace remoting { | 10 namespace remoting { |
| 9 namespace protocol { | 11 namespace protocol { |
| 10 | 12 |
| 11 // The UI implementations maintain corresponding definitions of this | 13 // The UI implementations maintain corresponding definitions of this |
| 12 // enumeration in webapp/error.js and | 14 // enumeration in webapp/error.js and |
| 13 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. | 15 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. |
| 14 // Be sure to update these locations if you make any changes to the ordering. | 16 // Be sure to update these locations if you make any changes to the ordering. |
| 15 enum ErrorCode { | 17 enum ErrorCode { |
| 16 OK = 0, | 18 OK = 0, |
| 17 PEER_IS_OFFLINE, | 19 PEER_IS_OFFLINE, |
| 18 SESSION_REJECTED, | 20 SESSION_REJECTED, |
| 19 INCOMPATIBLE_PROTOCOL, | 21 INCOMPATIBLE_PROTOCOL, |
| 20 AUTHENTICATION_FAILED, | 22 AUTHENTICATION_FAILED, |
| 21 CHANNEL_CONNECTION_ERROR, | 23 CHANNEL_CONNECTION_ERROR, |
| 22 SIGNALING_ERROR, | 24 SIGNALING_ERROR, |
| 23 SIGNALING_TIMEOUT, | 25 SIGNALING_TIMEOUT, |
| 24 HOST_OVERLOAD, | 26 HOST_OVERLOAD, |
| 25 UNKNOWN_ERROR, | 27 UNKNOWN_ERROR, |
| 26 }; | 28 }; |
| 27 | 29 |
| 30 // Returns the literal string of |error|. | |
| 31 const char* ErrorCodeToString(ErrorCode error); | |
| 32 | |
| 28 } // namespace protocol | 33 } // namespace protocol |
| 29 } // namespace remoting | 34 } // namespace remoting |
| 30 | 35 |
| 31 #endif // REMOTING_PROTOCOL_ERROR_H_ | 36 #endif // REMOTING_PROTOCOL_ERROR_H_ |
| OLD | NEW |