OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file implements the common entry point shared by all Chromoting Host | 5 // This file implements the common entry point shared by all Chromoting Host |
6 // processes. | 6 // processes. |
7 | 7 |
8 #include "remoting/host/host_main.h" | 8 #include "remoting/host/host_main.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return exit_code; | 128 return exit_code; |
129 } | 129 } |
130 | 130 |
131 return kSuccessExitCode; | 131 return kSuccessExitCode; |
132 } | 132 } |
133 | 133 |
134 #endif // !defined(OS_WIN) | 134 #endif // !defined(OS_WIN) |
135 | 135 |
136 // Select the entry point corresponding to the process type. | 136 // Select the entry point corresponding to the process type. |
137 MainRoutineFn SelectMainRoutine(const std::string& process_type) { | 137 MainRoutineFn SelectMainRoutine(const std::string& process_type) { |
138 MainRoutineFn main_routine = NULL; | 138 MainRoutineFn main_routine = nullptr; |
139 | 139 |
140 if (process_type == kProcessTypeHost) { | 140 if (process_type == kProcessTypeHost) { |
141 main_routine = &HostProcessMain; | 141 main_routine = &HostProcessMain; |
142 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
143 } else if (process_type == kProcessTypeDaemon) { | 143 } else if (process_type == kProcessTypeDaemon) { |
144 main_routine = &DaemonProcessMain; | 144 main_routine = &DaemonProcessMain; |
145 } else if (process_type == kProcessTypeDesktop) { | 145 } else if (process_type == kProcessTypeDesktop) { |
146 main_routine = &DesktopProcessMain; | 146 main_routine = &DesktopProcessMain; |
147 } else if (process_type == kProcessTypeController) { | 147 } else if (process_type == kProcessTypeController) { |
148 main_routine = &ElevatedControllerMain; | 148 main_routine = &ElevatedControllerMain; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 return exit_code; | 238 return exit_code; |
239 } | 239 } |
240 | 240 |
241 } // namespace remoting | 241 } // namespace remoting |
242 | 242 |
243 #if !defined(OS_WIN) | 243 #if !defined(OS_WIN) |
244 int main(int argc, char** argv) { | 244 int main(int argc, char** argv) { |
245 return remoting::HostMain(argc, argv); | 245 return remoting::HostMain(argc, argv); |
246 } | 246 } |
247 #endif // !defined(OS_WIN) | 247 #endif // !defined(OS_WIN) |
OLD | NEW |