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

Unified Diff: base/mac/mac_util.h

Issue 7144007: Improve and unify Mac OS X run-time version checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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') | base/mac/mac_util.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/mac_util.h
===================================================================
--- base/mac/mac_util.h (revision 88826)
+++ base/mac/mac_util.h (working copy)
@@ -110,6 +110,29 @@
// 'Login Item' with 'hide on startup' flag. Used to suppress opening windows.
bool WasLaunchedAsHiddenLoginItem();
+// Run-time OS version checks. Use these instead of
+// base::SysInfo::OperatingSystemVersionNumbers. Prefer the "OrEarlier" and
+// "OrLater" variants to those that check for a specific version, unless you
+// know for sure that you need to check for a specific version.
+
+// Leopard is Mac OS X 10.5, Darwin 9.
+bool IsOSLeopard();
+bool IsOSLeopardOrEarlier();
+
+// Snow Leopard is Mac OS X 10.6, Darwin 10.
+bool IsOSSnowLeopard();
+bool IsOSSnowLeopardOrEarlier();
+bool IsOSSnowLeopardOrLater();
+
+// Lion is Mac OS X 10.7, Darwin 11.
+bool IsOSLion();
+bool IsOSLionOrLater();
+
+// This should be infrequently used. It only makes sense to avoid codepaths
+// that are very likely to break on future (unreleased, untested, unborn) OS
+// releases.
+bool IsOSLaterThanLion();
+
} // namespace mac
} // namespace base
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | base/mac/mac_util.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698