| 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 "mojo/edk/test/multiprocess_test_helper.h" | 5 #include "mojo/edk/test/multiprocess_test_helper.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 9 #include "base/process/kill.h" | 11 #include "base/process/kill.h" |
| 10 #include "base/process/process_handle.h" | 12 #include "base/process/process_handle.h" |
| 11 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 12 #include "mojo/edk/embedder/embedder.h" | 14 #include "mojo/edk/embedder/embedder.h" |
| 13 #include "mojo/edk/embedder/platform_channel_pair.h" | 15 #include "mojo/edk/embedder/platform_channel_pair.h" |
| 14 | 16 |
| 15 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
| 16 #include "base/win/windows_version.h" | 18 #include "base/win/windows_version.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 client_platform_handle = | 112 client_platform_handle = |
| 111 PlatformChannelPair::PassClientHandleFromParentProcess( | 113 PlatformChannelPair::PassClientHandleFromParentProcess( |
| 112 *base::CommandLine::ForCurrentProcess()); | 114 *base::CommandLine::ForCurrentProcess()); |
| 113 | 115 |
| 114 std::string broker_handle_str = | 116 std::string broker_handle_str = |
| 115 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 117 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 116 kBrokerHandleSwitch); | 118 kBrokerHandleSwitch); |
| 117 ScopedPlatformHandle broker_handle = | 119 ScopedPlatformHandle broker_handle = |
| 118 PlatformChannelPair::PassClientHandleFromParentProcessFromString( | 120 PlatformChannelPair::PassClientHandleFromParentProcessFromString( |
| 119 broker_handle_str); | 121 broker_handle_str); |
| 120 SetParentPipeHandle(broker_handle.Pass()); | 122 SetParentPipeHandle(std::move(broker_handle)); |
| 121 } | 123 } |
| 122 | 124 |
| 123 // static | 125 // static |
| 124 ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; | 126 ScopedPlatformHandle MultiprocessTestHelper::client_platform_handle; |
| 125 | 127 |
| 126 } // namespace test | 128 } // namespace test |
| 127 } // namespace edk | 129 } // namespace edk |
| 128 } // namespace mojo | 130 } // namespace mojo |
| OLD | NEW |