diff options
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/file_descriptor.cc | 9 | ||||
-rw-r--r-- | dbus/file_descriptor.h | 10 |
2 files changed, 0 insertions, 19 deletions
diff --git a/dbus/file_descriptor.cc b/dbus/file_descriptor.cc index e607fc0..d2d6a31 100644 --- a/dbus/file_descriptor.cc +++ b/dbus/file_descriptor.cc @@ -2,21 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/bind.h" #include "base/files/file.h" -#include "base/location.h" #include "base/logging.h" -#include "base/threading/worker_pool.h" #include "dbus/file_descriptor.h" namespace dbus { -void CHROME_DBUS_EXPORT FileDescriptor::Deleter::operator()( - FileDescriptor* fd) { - base::WorkerPool::PostTask( - FROM_HERE, base::Bind(&base::DeletePointer<FileDescriptor>, fd), false); -} - FileDescriptor::~FileDescriptor() { if (owner_) base::File auto_closer(value_); diff --git a/dbus/file_descriptor.h b/dbus/file_descriptor.h index 1e62c87..19e0b1a 100644 --- a/dbus/file_descriptor.h +++ b/dbus/file_descriptor.h @@ -6,7 +6,6 @@ #define DBUS_FILE_DESCRIPTOR_H_ #include "base/basictypes.h" -#include "base/memory/scoped_ptr.h" #include "dbus/dbus_export.h" namespace dbus { @@ -34,12 +33,6 @@ namespace dbus { // with i/o restrictions. class CHROME_DBUS_EXPORT FileDescriptor { public: - // This provides a simple way to pass around file descriptors since they must - // be closed on a thread that is allowed to perform I/O. - struct Deleter { - void CHROME_DBUS_EXPORT operator()(FileDescriptor* fd); - }; - // Permits initialization without a value for passing to // dbus::MessageReader::PopFileDescriptor to fill in and from int values. FileDescriptor() : value_(-1), owner_(false), valid_(false) {} @@ -77,9 +70,6 @@ class CHROME_DBUS_EXPORT FileDescriptor { DISALLOW_COPY_AND_ASSIGN(FileDescriptor); }; -using ScopedFileDescriptor = - scoped_ptr<FileDescriptor, FileDescriptor::Deleter> CHROME_DBUS_EXPORT; - } // namespace dbus #endif // DBUS_FILE_DESCRIPTOR_H_ |