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

Side by Side Diff: mojo/system/platform_channel.cc

Issue 137273003: Mojo: Rename PlatformChannelHandle to PlatformHandle, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/system/platform_channel.h ('k') | mojo/system/platform_channel_handle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/system/platform_channel.h"
6
7 #include "base/logging.h"
8
9 namespace mojo {
10 namespace system {
11
12 PlatformChannel::~PlatformChannel() {
13 handle_.CloseIfNecessary();
14 }
15
16 // static
17 scoped_ptr<PlatformChannel> PlatformChannel::CreateFromHandle(
18 const PlatformChannelHandle& handle) {
19 DCHECK(handle.is_valid());
20 scoped_ptr<PlatformChannel> rv(new PlatformChannel());
21 *rv->mutable_handle() = handle;
22 return rv.Pass();
23 }
24
25 PlatformChannelHandle PlatformChannel::PassHandle() {
26 DCHECK(is_valid());
27 PlatformChannelHandle rv = handle_;
28 handle_ = PlatformChannelHandle();
29 return rv;
30 }
31
32 PlatformChannel::PlatformChannel() {
33 }
34
35 } // namespace system
36 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/system/platform_channel.h ('k') | mojo/system/platform_channel_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698