Index: base/mac/mac_util.h |
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h |
index f8ffa97545decf3717c102853461d92877f5e8a6..af5266799e9bcedb76e68e4804f526a582906c8d 100644 |
--- a/base/mac/mac_util.h |
+++ b/base/mac/mac_util.h |
@@ -147,6 +147,10 @@ BASE_EXPORT bool IsOSMavericksOrLater(); |
BASE_EXPORT bool IsOSYosemite(); |
BASE_EXPORT bool IsOSYosemiteOrLater(); |
+// El Capitan is Mac OS X 10.11, Darwin 15. |
+BASE_EXPORT bool IsOSElCapitan(); |
+BASE_EXPORT bool IsOSElCapitanOrLater(); |
+ |
// 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. |
@@ -157,6 +161,9 @@ BASE_EXPORT bool IsOSLaterThanYosemite_DontCallThis(); |
inline bool IsOSLionOrEarlier() { return !IsOSMountainLionOrLater(); } |
inline bool IsOSMountainLionOrEarlier() { return !IsOSMavericksOrLater(); } |
inline bool IsOSMavericksOrEarlier() { return !IsOSYosemiteOrLater(); } |
+inline bool IsOSYosemiteOrEarlier() { |
+ return !IsOSElCapitanOrLater(); |
+} |
// 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 |
@@ -213,6 +220,22 @@ inline bool IsOSYosemite() { return false; } |
inline bool IsOSLaterThanYosemite_DontCallThis() { return true; } |
#endif |
+#if defined(MAC_OS_X_VERSION_10_11) && \ |
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 |
+#define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_11 |
+inline bool IsOSElCapitanOrLater() { |
+ return true; |
+} |
+#endif |
+ |
+#if defined(MAC_OS_X_VERSION_10_11) && \ |
+ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_11 |
+#define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_11 |
+inline bool IsOSElCapitan() { |
+ return false; |
+} |
+#endif |
+ |
// Retrieve the system's model identifier string from the IOKit registry: |
// for example, "MacPro4,1", "MacBookPro6,1". Returns empty string upon |
// failure. |