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

Side by Side Diff: ipc/test_util_mac.h

Issue 1397023002: ipc: Write end-to-end tests for SharedMemoryHandle brokering on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Win compile errors. Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « ipc/ipc_test_messages.h ('k') | ipc/test_util_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains Mac-specific utility functions used by ipc tests. 5 // This file contains Mac-specific utility functions used by multiple test
6 // suites.
6 7
7 #ifndef IPC_TEST_UTIL_MAC_H_ 8 #ifndef IPC_TEST_UTIL_MAC_H_
8 #define IPC_TEST_UTIL_MAC_H_ 9 #define IPC_TEST_UTIL_MAC_H_
9 10
10 #include <mach/mach.h> 11 #include <mach/mach.h>
11 12
12 #include <string> 13 #include <string>
13 14
14 #include "base/mac/scoped_mach_port.h" 15 #include "base/mac/scoped_mach_port.h"
15 16
(...skipping 19 matching lines...) Expand all
35 36
36 // Passes a copy of the send right of |port_to_send| to |receiving_port|, using 37 // Passes a copy of the send right of |port_to_send| to |receiving_port|, using
37 // the given |disposition|. 38 // the given |disposition|.
38 void SendMachPort(mach_port_t receiving_port, 39 void SendMachPort(mach_port_t receiving_port,
39 mach_port_t port_to_send, 40 mach_port_t port_to_send,
40 int disposition); 41 int disposition);
41 42
42 // The number of active names in the current task's port name space. 43 // The number of active names in the current task's port name space.
43 mach_msg_type_number_t GetActiveNameCount(); 44 mach_msg_type_number_t GetActiveNameCount();
44 45
46 // The number of references the current task has for a given name.
47 mach_port_urefs_t GetMachRefCount(mach_port_name_t name,
48 mach_port_right_t right);
49
45 // Increments the ref count for the right/name pair. 50 // Increments the ref count for the right/name pair.
46 void IncrementMachRefCount(mach_port_name_t name, mach_port_right_t right); 51 void IncrementMachRefCount(mach_port_name_t name, mach_port_right_t right);
47 52
48 } // namespace IPC 53 } // namespace IPC
49 54
50 #endif // IPC_TEST_UTIL_MAC_H_ 55 #endif // IPC_TEST_UTIL_MAC_H_
OLDNEW
« no previous file with comments | « ipc/ipc_test_messages.h ('k') | ipc/test_util_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698