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

Unified Diff: base/mac/mac_util.mm

Issue 325423005: Update OS version functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: base/mac/mac_util.mm
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm
index 5f08a44928e6342b88cce4896596a099c79a117d..561c3d0f9a46a0fedbcc1f61ed6dc285a780f538 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -460,7 +460,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 > 13) << "Assuming Darwin "
+ DLOG_IF(WARNING, darwin_major_version > 14) << "Assuming Darwin "
<< base::IntToString(darwin_major_version) << " is Mac OS X 10."
<< base::IntToString(mac_os_x_minor_version);
@@ -479,6 +479,7 @@ enum {
LION_MINOR_VERSION = 7,
MOUNTAIN_LION_MINOR_VERSION = 8,
MAVERICKS_MINOR_VERSION = 9,
+ YOSEMITE_MINOR_VERSION = 10,
};
} // namespace
@@ -525,8 +526,20 @@ bool IsOSMavericksOrLater() {
}
#endif
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9)
-bool IsOSLaterThanMavericks_DontCallThis() {
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10)
+bool IsOSYosemite() {
+ return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION;
+}
+#endif
+
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10)
+bool IsOSYosemiteOrLater() {
+ return MacOSXMinorVersion() >= YOSEMITE_MINOR_VERSION;
+}
+#endif
+
+#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10)
+bool IsOSLaterThanYosemite_DontCallThis() {
return MacOSXMinorVersion() > MAVERICKS_MINOR_VERSION;
Mark Mentovai 2014/06/12 18:00:27 This is wrong.
Avi (use Gerrit) 2014/06/12 18:04:35 Done.
}
#endif

Powered by Google App Engine
This is Rietveld 408576698