OLD | NEW |
---|---|
(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_PUBLIC_UTILITY_SCOPED_HANDLE_H_ | |
6 #define MOJO_PUBLIC_UTILITY_SCOPED_HANDLE_H_ | |
7 | |
8 #include "mojo/public/system/core.h" | |
9 #include "mojo/public/system/system_export.h" | |
darin (slow to review)
2013/11/01 23:05:13
LGTM w/ this line and the MOJO_SYSTEM_EXPORT remov
| |
10 | |
11 namespace mojo { | |
12 | |
13 // Closes handle_ when deleted. | |
14 // This probably wants tons of improvements, but those can be made as needed. | |
15 class MOJO_SYSTEM_EXPORT ScopedHandle { | |
darin (slow to review)
2013/11/01 23:04:52
nit: no need for the export. this is a static libr
| |
16 public: | |
17 ScopedHandle(Handle handle); | |
18 ~ScopedHandle(); | |
19 Handle get() const { return handle_; } | |
20 Handle Release(); | |
21 | |
22 private: | |
23 Handle handle_; | |
24 }; | |
25 | |
26 } // namespace mojo | |
27 | |
28 #endif // MOJO_PUBLIC_SYSTEM_SCOPED_HANDLE_H_ | |
OLD | NEW |