Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1259)

Unified Diff: mojo/system/platform_channel.cc

Issue 133533007: Mojo: Move PlatformChannelPair to its own files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/system/platform_channel.h ('k') | mojo/system/platform_channel_pair.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/platform_channel.cc
diff --git a/mojo/system/platform_channel.cc b/mojo/system/platform_channel.cc
index 9f362f69c1ba0c113fe4187e7f0ce70124db0bc7..159decebd4b432685eaabd38597e869632f769a5 100644
--- a/mojo/system/platform_channel.cc
+++ b/mojo/system/platform_channel.cc
@@ -32,36 +32,5 @@ PlatformChannelHandle PlatformChannel::PassHandle() {
PlatformChannel::PlatformChannel() {
}
-// -----------------------------------------------------------------------------
-
-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();
-}
-
-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();
-}
-
} // namespace system
} // namespace mojo
« no previous file with comments | « mojo/system/platform_channel.h ('k') | mojo/system/platform_channel_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698