Index: mojo/system/platform_channel_pair.cc |
diff --git a/mojo/system/platform_channel_pair.cc b/mojo/system/platform_channel_pair.cc |
index cdf27a465426694349542cdb3f9787a65e90c543..f1cd594cf0d7bef76d526fe9f0c196476d6da3f5 100644 |
--- a/mojo/system/platform_channel_pair.cc |
+++ b/mojo/system/platform_channel_pair.cc |
@@ -5,38 +5,19 @@ |
#include "mojo/system/platform_channel_pair.h" |
#include "base/logging.h" |
-#include "mojo/system/platform_channel.h" |
namespace mojo { |
namespace system { |
PlatformChannelPair::~PlatformChannelPair() { |
- server_handle_.CloseIfNecessary(); |
- client_handle_.CloseIfNecessary(); |
} |
-scoped_ptr<PlatformChannel> PlatformChannelPair::CreateServerChannel() { |
- if (!server_handle_.is_valid()) { |
- LOG(WARNING) << "Server handle invalid"; |
- return scoped_ptr<PlatformChannel>(); |
- } |
- |
- scoped_ptr<PlatformChannel> rv = |
- PlatformChannel::CreateFromHandle(server_handle_); |
- server_handle_ = PlatformChannelHandle(); |
- return rv.Pass(); |
+ScopedPlatformHandle PlatformChannelPair::PassServerHandle() { |
+ return server_handle_.Pass(); |
} |
-scoped_ptr<PlatformChannel> PlatformChannelPair::CreateClientChannel() { |
- if (!client_handle_.is_valid()) { |
- LOG(WARNING) << "Client handle invalid"; |
- return scoped_ptr<PlatformChannel>(); |
- } |
- |
- scoped_ptr<PlatformChannel> rv = |
- PlatformChannel::CreateFromHandle(client_handle_); |
- client_handle_ = PlatformChannelHandle(); |
- return rv.Pass(); |
+ScopedPlatformHandle PlatformChannelPair::PassClientHandle() { |
+ return client_handle_.Pass(); |
} |
} // namespace system |