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

Side by Side Diff: mojo/shell/scoped_message_pipe.cc

Issue 64973002: Moves some files into mojo/common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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/shell/scoped_message_pipe.h"
6
7 namespace mojo {
8 namespace shell {
9
10 ScopedMessagePipe::ScopedMessagePipe()
11 : handle_0_(MOJO_HANDLE_INVALID),
12 handle_1_(MOJO_HANDLE_INVALID) {
13 MojoCreateMessagePipe(&handle_0_, &handle_1_);
14 }
15
16 ScopedMessagePipe::~ScopedMessagePipe() {
17 if (handle_0_ != MOJO_HANDLE_INVALID)
18 MojoClose(handle_0_);
19
20 if (handle_1_ != MOJO_HANDLE_INVALID)
21 MojoClose(handle_1_);
22 }
23
24 } // namespace shell
25 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698