OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 is used to handle differences in Mach message IDs and structures | 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 | 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 | 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 | 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 | 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. | 10 // the stable OS API, and so differences do exist between OS versions. |
11 | 11 |
12 #ifndef SANDBOX_MAC_OS_COMPATIBILITY_H_ | 12 #ifndef SANDBOX_MAC_OS_COMPATIBILITY_H_ |
13 #define SANDBOX_MAC_OS_COMPATIBILITY_H_ | 13 #define SANDBOX_MAC_OS_COMPATIBILITY_H_ |
14 | 14 |
15 #include <mach/mach.h> | 15 #include <mach/mach.h> |
| 16 #include <stdint.h> |
16 | 17 |
17 #include <string> | 18 #include <string> |
18 | 19 |
19 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
20 #include "sandbox/mac/message_server.h" | 21 #include "sandbox/mac/message_server.h" |
21 | 22 |
22 namespace sandbox { | 23 namespace sandbox { |
23 | 24 |
24 class OSCompatibility { | 25 class OSCompatibility { |
25 public: | 26 public: |
(...skipping 26 matching lines...) Expand all Loading... |
52 | 53 |
53 // A function to take a swap_integer message and return true if the message | 54 // A function to take a swap_integer message and return true if the message |
54 // is only getting the value of a key, neither setting it directly, nor | 55 // is only getting the value of a key, neither setting it directly, nor |
55 // swapping two keys. | 56 // swapping two keys. |
56 virtual bool IsSwapIntegerReadOnly(const IPCMessage message) = 0; | 57 virtual bool IsSwapIntegerReadOnly(const IPCMessage message) = 0; |
57 }; | 58 }; |
58 | 59 |
59 } // namespace sandbox | 60 } // namespace sandbox |
60 | 61 |
61 #endif // SANDBOX_MAC_OS_COMPATIBILITY_H_ | 62 #endif // SANDBOX_MAC_OS_COMPATIBILITY_H_ |
OLD | NEW |