summaryrefslogtreecommitdiffstats
path: root/dbus/file_descriptor.cc
diff options
context:
space:
mode:
authorsleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 06:46:20 +0000
committersleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-30 06:46:20 +0000
commite146bfcf4924815ea32b0e135d720eed26d5bade (patch)
tree2f6f69341aca38b5f2eb5ec5b0725651f4ea3c3b /dbus/file_descriptor.cc
parent9129b4fc22326a23a141c668e936e650801521e0 (diff)
downloadchromium_src-e146bfcf4924815ea32b0e135d720eed26d5bade.zip
chromium_src-e146bfcf4924815ea32b0e135d720eed26d5bade.tar.gz
chromium_src-e146bfcf4924815ea32b0e135d720eed26d5bade.tar.bz2
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
Diffstat (limited to 'dbus/file_descriptor.cc')
-rw-r--r--dbus/file_descriptor.cc15
1 files changed, 15 insertions, 0 deletions
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