Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3110)

Unified Diff: base/mach_ipc_mac.h

Issue 9193024: [Mac] Add a perf test that counts the number of Mach ports in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/mach_ipc_mac.mm » ('j') | base/mach_ipc_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mach_ipc_mac.h
diff --git a/base/mach_ipc_mac.h b/base/mach_ipc_mac.h
index 7d39101965e735f691f188756d4848e955cb4772..9c2698e6f93f675dfa1f1875cc0118d31e0138fc 100644
--- a/base/mach_ipc_mac.h
+++ b/base/mach_ipc_mac.h
@@ -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_
« no previous file with comments | « no previous file | base/mach_ipc_mac.mm » ('j') | base/mach_ipc_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698