| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Windows service controlling Me2Me host processes | 5 // This file implements the Windows service controlling Me2Me host processes |
| 6 // running within user sessions. | 6 // running within user sessions. |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Launch the input thread. | 45 // Launch the input thread. |
| 46 scoped_refptr<AutoThreadTaskRunner> input_task_runner = | 46 scoped_refptr<AutoThreadTaskRunner> input_task_runner = |
| 47 AutoThread::CreateWithType( | 47 AutoThread::CreateWithType( |
| 48 "Input thread", ui_task_runner, base::MessageLoop::TYPE_IO); | 48 "Input thread", ui_task_runner, base::MessageLoop::TYPE_IO); |
| 49 | 49 |
| 50 // Launch the I/O thread. | 50 // Launch the I/O thread. |
| 51 scoped_refptr<AutoThreadTaskRunner> io_task_runner = | 51 scoped_refptr<AutoThreadTaskRunner> io_task_runner = |
| 52 AutoThread::CreateWithType("I/O thread", ui_task_runner, | 52 AutoThread::CreateWithType("I/O thread", ui_task_runner, |
| 53 base::MessageLoop::TYPE_IO); | 53 base::MessageLoop::TYPE_IO); |
| 54 | 54 |
| 55 mojo::edk::ScopedIPCSupport ipc_support(io_task_runner->task_runner()); | 55 mojo::edk::ScopedIPCSupport ipc_support( |
| 56 io_task_runner->task_runner(), |
| 57 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST); |
| 56 mojo::edk::ScopedPlatformHandle parent_pipe = | 58 mojo::edk::ScopedPlatformHandle parent_pipe = |
| 57 mojo::edk::PlatformChannelPair::PassClientHandleFromParentProcess( | 59 mojo::edk::PlatformChannelPair::PassClientHandleFromParentProcess( |
| 58 *command_line); | 60 *command_line); |
| 59 if (!parent_pipe.is_valid()) { | 61 if (!parent_pipe.is_valid()) { |
| 60 parent_pipe = | 62 parent_pipe = |
| 61 mojo::edk::NamedPlatformChannelPair::PassClientHandleFromParentProcess( | 63 mojo::edk::NamedPlatformChannelPair::PassClientHandleFromParentProcess( |
| 62 *command_line); | 64 *command_line); |
| 63 } | 65 } |
| 64 if (!parent_pipe.is_valid()) { | 66 if (!parent_pipe.is_valid()) { |
| 65 return kInvalidCommandLineExitCode; | 67 return kInvalidCommandLineExitCode; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 96 return kSuccessExitCode; | 98 return kSuccessExitCode; |
| 97 } | 99 } |
| 98 | 100 |
| 99 } // namespace remoting | 101 } // namespace remoting |
| 100 | 102 |
| 101 #if !defined(OS_WIN) | 103 #if !defined(OS_WIN) |
| 102 int main(int argc, char** argv) { | 104 int main(int argc, char** argv) { |
| 103 return remoting::HostMain(argc, argv); | 105 return remoting::HostMain(argc, argv); |
| 104 } | 106 } |
| 105 #endif // !defined(OS_WIN) | 107 #endif // !defined(OS_WIN) |
| OLD | NEW |