Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2884)

Unified Diff: base/mac/mac_util.h

Issue 9706001: [Mac] Add the OS version check functions for 10.8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_util.h
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
index 4fefe6c5ee80976d9788193dbd5e1c9b6a2c6d29..8820690cb694c4da0b94bebd0602279f68d12677 100644
--- a/base/mac/mac_util.h
+++ b/base/mac/mac_util.h
@@ -138,8 +138,14 @@ 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 03:30:38 This should not be present. Instead, provide IsOSL
Robert Sesek 2012/03/14 14:46:22 I think it should be present. It will just have to
+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.
@@ -170,9 +176,23 @@ 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; }
inline bool IsOSLaterThanLion() { 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_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; }
+#endif
+
// Retrieve the system's model identifier string from the IOKit registry:
// for example, "MacPro4,1", "MacBookPro6,1". Returns empty string upon
// failure.
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698