| OLD | NEW |
| 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/setup/me2me_native_messaging_host_main.h" | 5 #include "remoting/host/setup/me2me_native_messaging_host_main.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/i18n/icu_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 11 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
| 12 #include "net/url_request/url_fetcher.h" | 13 #include "net/url_request/url_fetcher.h" |
| 13 #include "remoting/base/breakpad.h" | 14 #include "remoting/base/breakpad.h" |
| 14 #include "remoting/host/host_exit_codes.h" | 15 #include "remoting/host/host_exit_codes.h" |
| 15 #include "remoting/host/logging.h" | 16 #include "remoting/host/logging.h" |
| 16 #include "remoting/host/pairing_registry_delegate.h" | 17 #include "remoting/host/pairing_registry_delegate.h" |
| 17 #include "remoting/host/setup/me2me_native_messaging_host.h" | 18 #include "remoting/host/setup/me2me_native_messaging_host.h" |
| 18 #include "remoting/host/usage_stats_consent.h" | 19 #include "remoting/host/usage_stats_consent.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 return elevation.TokenIsElevated != 0; | 59 return elevation.TokenIsElevated != 0; |
| 59 } | 60 } |
| 60 #endif // defined(OS_WIN) | 61 #endif // defined(OS_WIN) |
| 61 | 62 |
| 62 int StartMe2MeNativeMessagingHost() { | 63 int StartMe2MeNativeMessagingHost() { |
| 63 #if defined(OS_MACOSX) | 64 #if defined(OS_MACOSX) |
| 64 // Needed so we don't leak objects when threads are created. | 65 // Needed so we don't leak objects when threads are created. |
| 65 base::mac::ScopedNSAutoreleasePool pool; | 66 base::mac::ScopedNSAutoreleasePool pool; |
| 66 #endif // defined(OS_MACOSX) | 67 #endif // defined(OS_MACOSX) |
| 67 | 68 |
| 69 // Required to find the ICU data file, used by some file_util routines. |
| 70 base::i18n::InitializeICU(); |
| 71 |
| 68 #if defined(REMOTING_ENABLE_BREAKPAD) | 72 #if defined(REMOTING_ENABLE_BREAKPAD) |
| 69 // Initialize Breakpad as early as possible. On Mac the command-line needs to | 73 // Initialize Breakpad as early as possible. On Mac the command-line needs to |
| 70 // be initialized first, so that the preference for crash-reporting can be | 74 // be initialized first, so that the preference for crash-reporting can be |
| 71 // looked up in the config file. | 75 // looked up in the config file. |
| 72 if (IsUsageStatsAllowed()) { | 76 if (IsUsageStatsAllowed()) { |
| 73 InitializeCrashReporting(); | 77 InitializeCrashReporting(); |
| 74 } | 78 } |
| 75 #endif // defined(REMOTING_ENABLE_BREAKPAD) | 79 #endif // defined(REMOTING_ENABLE_BREAKPAD) |
| 76 | 80 |
| 77 // Mac OS X requires that the main thread be a UI message loop in order to | 81 // Mac OS X requires that the main thread be a UI message loop in order to |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // This object instance is required by Chrome code (such as MessageLoop). | 256 // This object instance is required by Chrome code (such as MessageLoop). |
| 253 base::AtExitManager exit_manager; | 257 base::AtExitManager exit_manager; |
| 254 | 258 |
| 255 CommandLine::Init(argc, argv); | 259 CommandLine::Init(argc, argv); |
| 256 remoting::InitHostLogging(); | 260 remoting::InitHostLogging(); |
| 257 | 261 |
| 258 return StartMe2MeNativeMessagingHost(); | 262 return StartMe2MeNativeMessagingHost(); |
| 259 } | 263 } |
| 260 | 264 |
| 261 } // namespace remoting | 265 } // namespace remoting |
| OLD | NEW |