Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: remoting/protocol/errors.h

Issue 2026123002: [Chromoting] Use google:remoting namespace to export remoting specific error codes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/protocol/errors.cc » ('j') | remoting/protocol/errors.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "remoting/protocol/name_value_map.h"
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 INVALID_ACCOUNT, 23 INVALID_ACCOUNT,
22 CHANNEL_CONNECTION_ERROR, 24 CHANNEL_CONNECTION_ERROR,
23 SIGNALING_ERROR, 25 SIGNALING_ERROR,
24 SIGNALING_TIMEOUT, 26 SIGNALING_TIMEOUT,
25 HOST_OVERLOAD, 27 HOST_OVERLOAD,
26 MAX_SESSION_LENGTH, 28 MAX_SESSION_LENGTH,
27 HOST_CONFIGURATION_ERROR, 29 HOST_CONFIGURATION_ERROR,
28 UNKNOWN_ERROR, 30 UNKNOWN_ERROR,
29 31
30 ERROR_CODE_MAX = UNKNOWN_ERROR, 32 ERROR_CODE_MAX = UNKNOWN_ERROR,
31 }; 33 };
32 34
35 extern const NameMapElement<ErrorCode> kErrorCodes[ERROR_CODE_MAX + 1];
Sergey Ulanov 2016/06/02 09:26:03 Please don't expose this here. Instead add ParseEr
Hzj_jie 2016/06/02 22:00:18 Done.
36
33 // Returns the literal string of |error|. 37 // Returns the literal string of |error|.
34 const char* ErrorCodeToString(ErrorCode error); 38 const char* ErrorCodeToString(ErrorCode error);
35 39
36 } // namespace protocol 40 } // namespace protocol
37 } // namespace remoting 41 } // namespace remoting
38 42
39 #endif // REMOTING_PROTOCOL_ERROR_H_ 43 #endif // REMOTING_PROTOCOL_ERROR_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/errors.cc » ('j') | remoting/protocol/errors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698