Index: base/mac/mac_util.h |
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h |
index 23b57edaee2a983a607175c6e4ed06e963728a01..9f66b9034c29c27add8cf43ae55abc1a5d51e9f5 100644 |
--- a/base/mac/mac_util.h |
+++ b/base/mac/mac_util.h |
@@ -145,12 +145,23 @@ BASE_EXPORT bool IsOSLionOrLater(); |
// Mountain Lion is Mac OS X 10.8, Darwin 12. |
BASE_EXPORT bool IsOSMountainLion(); |
+BASE_EXPORT bool IsOSMountainLionOrEarlier(); |
BASE_EXPORT bool IsOSMountainLionOrLater(); |
+// Mavericks is Mac OS X 10.9, Darwin 13. |
+BASE_EXPORT bool IsOSMavericks(); |
+BASE_EXPORT bool IsOSMavericksOrLater(); |
+ |
// 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, or to log when the OS is newer than any known version. |
-BASE_EXPORT bool IsOSLaterThanMountainLion_DontCallThis(); |
+BASE_EXPORT bool IsOSLaterThanMavericks_DontCallThis(); |
+ |
+// Inline functions that are redundant due to version ranges being mutually- |
+// exclusive. |
+inline bool IsOSSnowLeopard() { return !IsOSLionOrLater(); } |
Mark Mentovai
2013/10/01 18:30:59
I don’t like the definition of this one. It relies
Avi (use Gerrit)
2013/10/01 19:24:22
Done.
|
+inline bool IsOSLionOrEarlier() { return !IsOSMountainLionOrLater(); } |
Mark Mentovai
2013/10/01 18:30:59
These two are fine.
|
+inline bool IsOSMountainLionOrEarlier() { return !IsOSMavericksOrLater(); } |
// 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 |
@@ -160,7 +171,6 @@ BASE_EXPORT bool IsOSLaterThanMountainLion_DontCallThis(); |
#if defined(MAC_OS_X_VERSION_10_7) && \ |
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 |
#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7 |
-inline bool IsOSSnowLeopard() { return false; } |
inline bool IsOSLionOrLater() { return true; } |
#endif |
@@ -168,7 +178,6 @@ 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 IsOSLionOrEarlier() { return false; } |
#endif |
#if defined(MAC_OS_X_VERSION_10_8) && \ |
@@ -181,9 +190,19 @@ inline bool IsOSMountainLionOrLater() { return true; } |
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 IsOSLaterThanMountainLion_DontCallThis() { |
- return true; |
-} |
+#endif |
+ |
+#if defined(MAC_OS_X_VERSION_10_9) && \ |
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 |
+#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_9 |
+inline bool IsOSMavericksOrLater() { return true; } |
+#endif |
+ |
+#if defined(MAC_OS_X_VERSION_10_9) && \ |
+ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_9 |
+#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9 |
+inline bool IsOSMavericks() { return false; } |
+inline bool IsOSLaterThanMavericks_DontCallThis() { return true; } |
#endif |
// Retrieve the system's model identifier string from the IOKit registry: |