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

Side by Side Diff: remoting/host/host_exit_codes.cc

Issue 1735523003: Improve handling of invalid command line in Me2Me host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_threads
Patch Set: Created 4 years, 9 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 | « remoting/host/host_exit_codes.h ('k') | remoting/host/host_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "remoting/host/host_exit_codes.h" 5 #include "remoting/host/host_exit_codes.h"
6 6
7 #include "remoting/protocol/name_value_map.h" 7 #include "remoting/protocol/name_value_map.h"
8 8
9 using remoting::protocol::NameMapElement; 9 using remoting::protocol::NameMapElement;
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 const NameMapElement<HostExitCodes> kHostExitCodeStrings[] = { 13 const NameMapElement<HostExitCodes> kHostExitCodeStrings[] = {
14 { kSuccessExitCode, "SUCCESS_EXIT" }, 14 { kSuccessExitCode, "SUCCESS_EXIT" },
15 { kInitializationFailed, "INITIALIZATION_FAILED" }, 15 { kInitializationFailed, "INITIALIZATION_FAILED" },
16 { kInvalidCommandLineExitCode, "INVALID_COMMAND_LINE" },
16 { kInvalidHostConfigurationExitCode, "INVALID_HOST_CONFIGURATION" }, 17 { kInvalidHostConfigurationExitCode, "INVALID_HOST_CONFIGURATION" },
17 { kInvalidHostIdExitCode, "INVALID_HOST_ID" }, 18 { kInvalidHostIdExitCode, "INVALID_HOST_ID" },
18 { kInvalidOauthCredentialsExitCode, "INVALID_OAUTH_CREDENTIALS" }, 19 { kInvalidOauthCredentialsExitCode, "INVALID_OAUTH_CREDENTIALS" },
19 { kInvalidHostDomainExitCode, "INVALID_HOST_DOMAIN" }, 20 { kInvalidHostDomainExitCode, "INVALID_HOST_DOMAIN" },
20 { kLoginScreenNotSupportedExitCode, "LOGIN_SCREEN_NOT_SUPPORTED" }, 21 { kLoginScreenNotSupportedExitCode, "LOGIN_SCREEN_NOT_SUPPORTED" },
21 { kUsernameMismatchExitCode, "USERNAME_MISMATCH" }, 22 { kUsernameMismatchExitCode, "USERNAME_MISMATCH" },
22 }; 23 };
23 24
24 const char* ExitCodeToString(HostExitCodes exit_code) { 25 const char* ExitCodeToString(HostExitCodes exit_code) {
25 return ValueToName(kHostExitCodeStrings, exit_code); 26 return ValueToName(kHostExitCodeStrings, exit_code);
26 } 27 }
27 28
28 } // namespace remoting 29 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_exit_codes.h ('k') | remoting/host/host_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698