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> |
11 | 11 |
12 #include "base/at_exit.h" | 12 #include "base/at_exit.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/strings/stringize_macros.h" | 16 #include "base/strings/stringize_macros.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "remoting/base/breakpad.h" | 19 #include "remoting/base/breakpad.h" |
20 #include "remoting/base/resources.h" | |
20 #include "remoting/host/host_exit_codes.h" | 21 #include "remoting/host/host_exit_codes.h" |
21 #include "remoting/host/logging.h" | 22 #include "remoting/host/logging.h" |
22 #include "remoting/host/usage_stats_consent.h" | 23 #include "remoting/host/usage_stats_consent.h" |
23 | 24 |
24 #if defined(OS_MACOSX) | 25 #if defined(OS_MACOSX) |
25 #include "base/mac/scoped_nsautorelease_pool.h" | 26 #include "base/mac/scoped_nsautorelease_pool.h" |
26 #endif // defined(OS_MACOSX) | 27 #endif // defined(OS_MACOSX) |
27 | 28 |
28 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
29 #include <commctrl.h> | 30 #include <commctrl.h> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 } | 226 } |
226 | 227 |
227 MainRoutineFn main_routine = SelectMainRoutine(process_type); | 228 MainRoutineFn main_routine = SelectMainRoutine(process_type); |
228 if (!main_routine) { | 229 if (!main_routine) { |
229 fprintf(stderr, "Unknown process type '%s' specified.", | 230 fprintf(stderr, "Unknown process type '%s' specified.", |
230 process_type.c_str()); | 231 process_type.c_str()); |
231 Usage(command_line->GetProgram()); | 232 Usage(command_line->GetProgram()); |
232 return kUsageExitCode; | 233 return kUsageExitCode; |
233 } | 234 } |
234 | 235 |
236 // .pak files are not used on Windows. Linux me2me host does not present any | |
237 // UI yet. | |
238 #if !defined(OS_WIN) && !defined(OS_LINUX) | |
Sergey Ulanov
2013/07/23 22:45:40
Can we always call LoadResources() and platform-sp
alexeypa (please no reviews)
2013/07/23 23:35:26
Will do.
| |
239 remoting::LoadResources(""); | |
240 #endif // !defined(OS_WIN) | |
241 | |
235 // Invoke the entry point. | 242 // Invoke the entry point. |
236 int exit_code = main_routine(); | 243 int exit_code = main_routine(); |
237 if (exit_code == kUsageExitCode) { | 244 if (exit_code == kUsageExitCode) { |
238 Usage(command_line->GetProgram()); | 245 Usage(command_line->GetProgram()); |
239 } | 246 } |
247 | |
248 // Do not use .pak files on Windows. Linux me2me host does not present any | |
249 // UI yet. | |
250 #if !defined(OS_WIN) | |
251 remoting::UnloadResources(); | |
252 #endif // !defined(OS_WIN) | |
253 | |
240 return exit_code; | 254 return exit_code; |
241 } | 255 } |
242 | 256 |
243 } // namespace remoting | 257 } // namespace remoting |
OLD | NEW |