Chromium Code Reviews| Index: base/mac/mac_util.h |
| diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h |
| index 4fefe6c5ee80976d9788193dbd5e1c9b6a2c6d29..3bec6dbea6c1e04da6ffc1fdbdc69aca1b0357d6 100644 |
| --- a/base/mac/mac_util.h |
| +++ b/base/mac/mac_util.h |
| @@ -138,12 +138,19 @@ BASE_EXPORT bool IsOSSnowLeopardOrLater(); |
| // Lion is Mac OS X 10.7, Darwin 11. |
| BASE_EXPORT bool IsOSLion(); |
| +BASE_EXPORT bool IsOSLionOrEarlier(); |
| BASE_EXPORT bool IsOSLionOrLater(); |
| +// Mountain Lion is Mac OS X 10.8, Darwin 12. |
| +BASE_EXPORT bool IsOSMountainLion(); |
| +BASE_EXPORT bool IsOSMountainLionOrEarlier(); |
|
Mark Mentovai
2012/03/14 16:55:41
xxx
|
| +BASE_EXPORT bool IsOSMountainLionOrLater(); |
| + |
| // This should be infrequently used. It only makes sense to use this to avoid |
| // codepaths that are very likely to break on future (unreleased, untested, |
| // unborn) OS releases. |
| -BASE_EXPORT bool IsOSLaterThanLion(); |
| +BASE_EXPORT |
| + bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement(); |
| // When the deployment target is set, the code produced cannot run on earlier |
| // OS releases. That enables some of the IsOS* family to be implemented as |
| @@ -170,7 +177,24 @@ inline bool IsOSLionOrLater() { return true; } |
| MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7 |
| #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7 |
| inline bool IsOSLion() { return false; } |
| -inline bool IsOSLaterThanLion() { return true; } |
| +inline bool IsOSLionOrEarlier() { return false; } |
| +#endif |
| + |
| +#if defined(MAC_OS_X_VERSION_10_8) && \ |
| + MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 |
| +#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8 |
| +inline bool IsOSMountainLionOrLater() { return true; } |
| +#endif |
| + |
| +#if defined(MAC_OS_X_VERSION_10_8) && \ |
| + MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_8 |
| +#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8 |
| +inline bool IsOSMountainLion() { return false; } |
| +inline bool IsOSMountainLionOrEarlier() { return false; } |
|
Mark Mentovai
2012/03/14 16:55:41
xxx
|
| +inline bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement() |
| +{ |
| + return true; |
| +} |
| #endif |
| // Retrieve the system's model identifier string from the IOKit registry: |