Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H | |
|
Robert Sesek
2016/10/06 18:58:53
nit: needs trailing _
| |
| 6 #define BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H | |
| 7 | |
| 8 #include <IOKit/IOKitLib.h> | |
| 9 | |
| 10 #include "base/scoped_generic.h" | |
| 11 | |
| 12 namespace base { | |
| 13 namespace mac { | |
| 14 | |
| 15 namespace internal { | |
| 16 | |
| 17 struct ScopedIONotificationPortRefTraits { | |
| 18 static IONotificationPortRef InvalidValue() { return nullptr; } | |
| 19 static void Free(IONotificationPortRef object) { | |
| 20 IONotificationPortDestroy(object); | |
| 21 } | |
| 22 }; | |
| 23 | |
| 24 } // namepsace internal | |
| 25 | |
| 26 using ScopedIONotificationPortRef = | |
| 27 ScopedGeneric<IONotificationPortRef, | |
| 28 internal::ScopedIONotificationPortRefTraits>; | |
| 29 | |
| 30 } // namespace mac | |
| 31 } // namespace base | |
| 32 | |
| 33 #endif // BASE_MAC_SCOPED_IONOTIFICATIONPORTREF_H | |
| OLD | NEW |