From e146bfcf4924815ea32b0e135d720eed26d5bade Mon Sep 17 00:00:00 2001 From: "sleffler@chromium.org" Date: Fri, 30 Mar 2012 06:46:20 +0000 Subject: dbus: add support for passing file descriptors Add support for passing file descriptors in messages. BUG=chromium-os:27809 TEST=run unit tests Change-Id: I48e52e52ea1e1a4b96bb0dbec7242337e5871510 Review URL: http://codereview.chromium.org/9700072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129801 0039d316-1c4b-4281-b951-d872f2087c98 --- dbus/file_descriptor.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 dbus/file_descriptor.cc (limited to 'dbus/file_descriptor.cc') diff --git a/dbus/file_descriptor.cc b/dbus/file_descriptor.cc new file mode 100644 index 0000000..fc240f5 --- /dev/null +++ b/dbus/file_descriptor.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/platform_file.h" +#include "dbus/file_descriptor.h" + +namespace dbus { + +FileDescriptor::~FileDescriptor() { + if (owner_) + base::ClosePlatformFile(value_); +} + +} // namespace dbus -- cgit v1.1