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.
5 #include "mojo/shell/scoped_message_pipe.h"
10 ScopedMessagePipe::ScopedMessagePipe()
11 : handle_0_(MOJO_HANDLE_INVALID),
12 handle_1_(MOJO_HANDLE_INVALID) {
13 MojoCreateMessagePipe(&handle_0_, &handle_1_);
16 ScopedMessagePipe::~ScopedMessagePipe() {
17 if (handle_0_ != MOJO_HANDLE_INVALID)
20 if (handle_1_ != MOJO_HANDLE_INVALID)