| 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> | |
| 17 | 16 |
| 18 #include <string> | 17 #include <string> |
| 19 | 18 |
| 20 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
| 21 #include "sandbox/mac/message_server.h" | 20 #include "sandbox/mac/message_server.h" |
| 22 | 21 |
| 23 namespace sandbox { | 22 namespace sandbox { |
| 24 | 23 |
| 25 class OSCompatibility { | 24 class OSCompatibility { |
| 26 public: | 25 public: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 53 | 52 |
| 54 // A function to take a swap_integer message and return true if the message | 53 // A function to take a swap_integer message and return true if the message |
| 55 // is only getting the value of a key, neither setting it directly, nor | 54 // is only getting the value of a key, neither setting it directly, nor |
| 56 // swapping two keys. | 55 // swapping two keys. |
| 57 virtual bool IsSwapIntegerReadOnly(const IPCMessage message) = 0; | 56 virtual bool IsSwapIntegerReadOnly(const IPCMessage message) = 0; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace sandbox | 59 } // namespace sandbox |
| 61 | 60 |
| 62 #endif // SANDBOX_MAC_OS_COMPATIBILITY_H_ | 61 #endif // SANDBOX_MAC_OS_COMPATIBILITY_H_ |
| OLD | NEW |