summaryrefslogtreecommitdiffstats
path: root/base/mach_ipc_mac.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/mach_ipc_mac.h')
-rw-r--r--base/mach_ipc_mac.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/base/mach_ipc_mac.h b/base/mach_ipc_mac.h
index 7d39101..d0898a3 100644
--- a/base/mach_ipc_mac.h
+++ b/base/mach_ipc_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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.
@@ -309,6 +309,19 @@ class BASE_EXPORT MachPortSender {
DISALLOW_COPY_AND_ASSIGN(MachPortSender);
};
+//==============================================================================
+// Static utility functions.
+
+namespace mac {
+
+// Returns the number of Mach ports to which the given task has a right.
+// Note that unless the calling task has send rights to the passed task port,
+// this will fail unless the calling task is running as root.
+kern_return_t BASE_EXPORT GetNumberOfMachPorts(mach_port_t task_port,
+ int* port_count);
+
+} // namespace mac
+
} // namespace base
#endif // BASE_MACH_IPC_MAC_H_