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

Side by Side Diff: sandbox/mac/os_compatibility.h

Issue 264923003: Initial implementation of the Mac Bootstrap Sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase for sandbox_export.h Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « sandbox/mac/launchd_interception_server.cc ('k') | sandbox/mac/os_compatibility.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This file is used to handle differences in Mach message IDs and structures
6 // that occur between different OS versions. The Mach messages that the sandbox
7 // is interested in are decoded using information derived from the open-source
8 // libraries, i.e. <http://www.opensource.apple.com/source/launchd/>. While
9 // these messages definitions are open source, they are not considered part of
10 // the stable OS API, and so differences do exist between OS versions.
11
12 #ifndef SANDBOX_MAC_OS_COMPATIBILITY_H_
13 #define SANDBOX_MAC_OS_COMPATIBILITY_H_
14
15 #include <mach/mach.h>
16
17 #include <string>
18
19 namespace sandbox {
20
21 typedef std::string (*LookUp2GetRequestName)(const mach_msg_header_t*);
22 typedef void (*LookUp2FillReply)(mach_msg_header_t*, mach_port_t service_port);
23
24 struct LaunchdCompatibilityShim {
25 // The msgh_id for look_up2.
26 mach_msg_id_t msg_id_look_up2;
27
28 // The msgh_id for swap_integer.
29 mach_msg_id_t msg_id_swap_integer;
30
31 // A function to take a look_up2 message and return the string service name
32 // that was requested via the message.
33 LookUp2GetRequestName look_up2_get_request_name;
34
35 // A function to formulate a reply to a look_up2 message, given the reply
36 // message and the port to return as the service.
37 LookUp2FillReply look_up2_fill_reply;
38 };
39
40 // Gets the compatibility shim for the launchd job subsystem.
41 const LaunchdCompatibilityShim GetLaunchdCompatibilityShim();
42
43 } // namespace sandbox
44
45 #endif // SANDBOX_MAC_OS_COMPATIBILITY_H_
OLDNEW
« no previous file with comments | « sandbox/mac/launchd_interception_server.cc ('k') | sandbox/mac/os_compatibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698