Index: base/mac/mac_util.mm |
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm |
index 1240906bb7fcd7e12df650b7747831e517eeaf1d..d707deb6c06cd57ccfe88a84d84045d0ad820b11 100644 |
--- a/base/mac/mac_util.mm |
+++ b/base/mac/mac_util.mm |
@@ -554,7 +554,7 @@ int MacOSXMinorVersionInternal() { |
// immediate death. |
CHECK(darwin_major_version >= 6); |
int mac_os_x_minor_version = darwin_major_version - 4; |
- DLOG_IF(WARNING, darwin_major_version > 11) << "Assuming Darwin " |
+ DLOG_IF(WARNING, darwin_major_version > 12) << "Assuming Darwin " |
<< base::IntToString(darwin_major_version) << " is Mac OS X 10." |
<< base::IntToString(mac_os_x_minor_version); |
@@ -571,7 +571,8 @@ int MacOSXMinorVersion() { |
enum { |
LEOPARD_MINOR_VERSION = 5, |
SNOW_LEOPARD_MINOR_VERSION = 6, |
- LION_MINOR_VERSION = 7 |
+ LION_MINOR_VERSION = 7, |
+ MOUNTAIN_LION_MINOR_VERSION = 8, |
}; |
} // namespace |
@@ -612,15 +613,39 @@ bool IsOSLion() { |
} |
#endif |
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) |
+bool IsOSLionOrEarlier() { |
+ return MacOSXMinorVersion() <= LION_MINOR_VERSION; |
+} |
+#endif |
+ |
#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) |
bool IsOSLionOrLater() { |
return MacOSXMinorVersion() >= LION_MINOR_VERSION; |
} |
#endif |
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) |
-bool IsOSLaterThanLion() { |
- return MacOSXMinorVersion() > LION_MINOR_VERSION; |
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
+bool IsOSMountainLion() { |
+ return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; |
+} |
+#endif |
+ |
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
+bool IsOSMountainLionOrEarlier() { |
Mark Mentovai
2012/03/14 16:55:41
xxx
|
+ return MacOSXMinorVersion() <= MOUNTAIN_LION_MINOR_VERSION; |
+} |
+#endif |
+ |
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) |
+bool IsOSMountainLionOrLater() { |
+ return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; |
+} |
+#endif |
+ |
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
+bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement() { |
+ return MacOSXMinorVersion() > MOUNTAIN_LION_MINOR_VERSION; |
} |
#endif |