OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/embedder/platform_channel_pair.h" | 5 #include "mojo/edk/embedder/platform_channel_pair.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/logging.h" | 9 #include "base/logging.h" |
8 | 10 |
9 namespace mojo { | 11 namespace mojo { |
10 namespace edk { | 12 namespace edk { |
11 | 13 |
12 const char PlatformChannelPair::kMojoPlatformChannelHandleSwitch[] = | 14 const char PlatformChannelPair::kMojoPlatformChannelHandleSwitch[] = |
13 "mojo-platform-channel-handle"; | 15 "mojo-platform-channel-handle"; |
14 | 16 |
15 PlatformChannelPair::~PlatformChannelPair() { | 17 PlatformChannelPair::~PlatformChannelPair() { |
16 } | 18 } |
17 | 19 |
18 ScopedPlatformHandle PlatformChannelPair::PassServerHandle() { | 20 ScopedPlatformHandle PlatformChannelPair::PassServerHandle() { |
19 return server_handle_.Pass(); | 21 return std::move(server_handle_); |
20 } | 22 } |
21 | 23 |
22 ScopedPlatformHandle PlatformChannelPair::PassClientHandle() { | 24 ScopedPlatformHandle PlatformChannelPair::PassClientHandle() { |
23 return client_handle_.Pass(); | 25 return std::move(client_handle_); |
24 } | 26 } |
25 | 27 |
26 void PlatformChannelPair::ChildProcessLaunched() { | 28 void PlatformChannelPair::ChildProcessLaunched() { |
27 DCHECK(client_handle_.is_valid()); | 29 DCHECK(client_handle_.is_valid()); |
28 client_handle_.reset(); | 30 client_handle_.reset(); |
29 } | 31 } |
30 | 32 |
31 } // namespace edk | 33 } // namespace edk |
32 } // namespace mojo | 34 } // namespace mojo |
OLD | NEW |