| 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 <cstdint> | 7 #include <cstdint> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 #if defined(REMOTING_ENABLE_BREAKPAD) | 79 #if defined(REMOTING_ENABLE_BREAKPAD) |
| 80 // Initialize Breakpad as early as possible. On Mac the command-line needs to | 80 // Initialize Breakpad as early as possible. On Mac the command-line needs to |
| 81 // be initialized first, so that the preference for crash-reporting can be | 81 // be initialized first, so that the preference for crash-reporting can be |
| 82 // looked up in the config file. | 82 // looked up in the config file. |
| 83 if (IsUsageStatsAllowed()) { | 83 if (IsUsageStatsAllowed()) { |
| 84 InitializeCrashReporting(); | 84 InitializeCrashReporting(); |
| 85 } | 85 } |
| 86 #endif // defined(REMOTING_ENABLE_BREAKPAD) | 86 #endif // defined(REMOTING_ENABLE_BREAKPAD) |
| 87 | 87 |
| 88 base::TaskScheduler::CreateAndSetSimpleTaskScheduler("Me2Me"); | 88 base::TaskScheduler::CreateAndStartWithDefaultParams("Me2Me"); |
| 89 | 89 |
| 90 // Mac OS X requires that the main thread be a UI message loop in order to | 90 // Mac OS X requires that the main thread be a UI message loop in order to |
| 91 // receive distributed notifications from the System Preferences pane. An | 91 // receive distributed notifications from the System Preferences pane. An |
| 92 // IO thread is needed for the pairing registry and URL context getter. | 92 // IO thread is needed for the pairing registry and URL context getter. |
| 93 base::Thread io_thread("io_thread"); | 93 base::Thread io_thread("io_thread"); |
| 94 io_thread.StartWithOptions( | 94 io_thread.StartWithOptions( |
| 95 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); | 95 base::Thread::Options(base::MessageLoop::TYPE_IO, 0)); |
| 96 | 96 |
| 97 base::Thread file_thread("file_thread"); | 97 base::Thread file_thread("file_thread"); |
| 98 file_thread.StartWithOptions( | 98 file_thread.StartWithOptions( |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // Run the loop until channel is alive. | 267 // Run the loop until channel is alive. |
| 268 run_loop.Run(); | 268 run_loop.Run(); |
| 269 | 269 |
| 270 // Block until tasks blocking shutdown have completed their execution. | 270 // Block until tasks blocking shutdown have completed their execution. |
| 271 base::TaskScheduler::GetInstance()->Shutdown(); | 271 base::TaskScheduler::GetInstance()->Shutdown(); |
| 272 | 272 |
| 273 return kSuccessExitCode; | 273 return kSuccessExitCode; |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace remoting | 276 } // namespace remoting |
| OLD | NEW |