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

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

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 #ifndef MOJO_SHELL_SCOPED_MESSAGE_PIPE_H_
6 #define MOJO_SHELL_SCOPED_MESSAGE_PIPE_H_
7
8 #include "base/basictypes.h"
9 #include "mojo/public/system/core.h"
10
11 namespace mojo {
12 namespace shell {
13
14 // Simple scoper that creates a message pipe in constructor and closes it in
15 // destructor. Test for success by comparing handles with MOJO_HANDLE_INVALID.
16 class ScopedMessagePipe {
17 public:
18 ScopedMessagePipe();
19 ~ScopedMessagePipe();
20
21 MojoHandle handle_0() const { return handle_0_; }
22 MojoHandle handle_1() const { return handle_1_; }
23
24 private:
25 MojoHandle handle_0_;
26 MojoHandle handle_1_;
27
28 DISALLOW_COPY_AND_ASSIGN(ScopedMessagePipe);
29 };
30
31 } // namespace shell
32 } // namespace mojo
33
34 #endif // MOJO_SHELL_SCOPED_MESSAGE_PIPE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698