| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef DBUS_FILE_DESCRIPTOR_H_ | 5 #ifndef DBUS_FILE_DESCRIPTOR_H_ |
| 6 #define DBUS_FILE_DESCRIPTOR_H_ | 6 #define DBUS_FILE_DESCRIPTOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/move.h" | 9 #include "base/move.h" |
| 11 #include "dbus/dbus_export.h" | 10 #include "dbus/dbus_export.h" |
| 12 | 11 |
| 13 namespace dbus { | 12 namespace dbus { |
| 14 | 13 |
| 15 // FileDescriptor is a type used to encapsulate D-Bus file descriptors | 14 // FileDescriptor is a type used to encapsulate D-Bus file descriptors |
| 16 // and to follow the RAII idiom appropiate for use with message operations | 15 // and to follow the RAII idiom appropiate for use with message operations |
| 17 // where the descriptor might be easily leaked. To guard against this the | 16 // where the descriptor might be easily leaked. To guard against this the |
| 18 // descriptor is closed when an instance is destroyed if it is owned. | 17 // descriptor is closed when an instance is destroyed if it is owned. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 bool owner_; | 82 bool owner_; |
| 84 bool valid_; | 83 bool valid_; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 using ScopedFileDescriptor = | 86 using ScopedFileDescriptor = |
| 88 scoped_ptr<FileDescriptor, FileDescriptor::Deleter>; | 87 scoped_ptr<FileDescriptor, FileDescriptor::Deleter>; |
| 89 | 88 |
| 90 } // namespace dbus | 89 } // namespace dbus |
| 91 | 90 |
| 92 #endif // DBUS_FILE_DESCRIPTOR_H_ | 91 #endif // DBUS_FILE_DESCRIPTOR_H_ |
| OLD | NEW |