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

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

Issue 2424353002: Use ChannelMojo between the remoting daemon and network processes. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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/i18n/icu_util.h" 15 #include "base/i18n/icu_util.h"
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/stringize_macros.h" 18 #include "base/strings/stringize_macros.h"
19 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
20 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "build/build_config.h" 21 #include "build/build_config.h"
22 #include "mojo/edk/embedder/embedder.h"
22 #include "remoting/base/breakpad.h" 23 #include "remoting/base/breakpad.h"
23 #include "remoting/host/host_exit_codes.h" 24 #include "remoting/host/host_exit_codes.h"
24 #include "remoting/host/logging.h" 25 #include "remoting/host/logging.h"
25 #include "remoting/host/resources.h" 26 #include "remoting/host/resources.h"
26 #include "remoting/host/setup/me2me_native_messaging_host.h" 27 #include "remoting/host/setup/me2me_native_messaging_host.h"
27 #include "remoting/host/switches.h" 28 #include "remoting/host/switches.h"
28 #include "remoting/host/usage_stats_consent.h" 29 #include "remoting/host/usage_stats_consent.h"
29 30
30 #if defined(OS_MACOSX) 31 #if defined(OS_MACOSX)
31 #include "base/mac/scoped_nsautorelease_pool.h" 32 #include "base/mac/scoped_nsautorelease_pool.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 process_type.c_str()); 205 process_type.c_str());
205 Usage(command_line->GetProgram()); 206 Usage(command_line->GetProgram());
206 return kInvalidCommandLineExitCode; 207 return kInvalidCommandLineExitCode;
207 } 208 }
208 209
209 // Required to find the ICU data file, used by some file_util routines. 210 // Required to find the ICU data file, used by some file_util routines.
210 base::i18n::InitializeICU(); 211 base::i18n::InitializeICU();
211 212
212 remoting::LoadResources(""); 213 remoting::LoadResources("");
213 214
215 mojo::edk::Init();
joedow 2016/10/24 17:42:51 I'm not sure how expensive this call is for the ot
Sergey Ulanov 2016/10/24 17:53:15 +1 It's also likely to affect binary size, as we d
Sam McNally 2016/10/24 22:54:04 Done.
216
214 // Invoke the entry point. 217 // Invoke the entry point.
215 int exit_code = main_routine(); 218 int exit_code = main_routine();
216 if (exit_code == kInvalidCommandLineExitCode) { 219 if (exit_code == kInvalidCommandLineExitCode) {
217 Usage(command_line->GetProgram()); 220 Usage(command_line->GetProgram());
218 } 221 }
219 222
220 remoting::UnloadResources(); 223 remoting::UnloadResources();
221 224
222 return exit_code; 225 return exit_code;
223 } 226 }
224 227
225 } // namespace remoting 228 } // namespace remoting
226 229
227 #if !defined(OS_WIN) 230 #if !defined(OS_WIN)
228 int main(int argc, char** argv) { 231 int main(int argc, char** argv) {
229 return remoting::HostMain(argc, argv); 232 return remoting::HostMain(argc, argv);
230 } 233 }
231 #endif // !defined(OS_WIN) 234 #endif // !defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698