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

Side by Side Diff: mojo/common/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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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/shell/scoped_message_pipe.h" 5 #include "mojo/common/scoped_message_pipe.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 namespace shell { 8 namespace common {
9 9
10 ScopedMessagePipe::ScopedMessagePipe() 10 ScopedMessagePipe::ScopedMessagePipe()
11 : handle_0_(MOJO_HANDLE_INVALID), 11 : handle_0_(MOJO_HANDLE_INVALID),
12 handle_1_(MOJO_HANDLE_INVALID) { 12 handle_1_(MOJO_HANDLE_INVALID) {
13 MojoCreateMessagePipe(&handle_0_, &handle_1_); 13 MojoCreateMessagePipe(&handle_0_, &handle_1_);
14 } 14 }
15 15
16 ScopedMessagePipe::~ScopedMessagePipe() { 16 ScopedMessagePipe::~ScopedMessagePipe() {
17 if (handle_0_ != MOJO_HANDLE_INVALID) 17 if (handle_0_ != MOJO_HANDLE_INVALID)
18 MojoClose(handle_0_); 18 MojoClose(handle_0_);
19 19
20 if (handle_1_ != MOJO_HANDLE_INVALID) 20 if (handle_1_ != MOJO_HANDLE_INVALID)
21 MojoClose(handle_1_); 21 MojoClose(handle_1_);
22 } 22 }
23 23
24 } // namespace shell 24 } // namespace common
25 } // namespace mojo 25 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698