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

Unified Diff: base/mac/mac_util.mm

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Add SDK guards to blink, simplify how IsOS* are defined Created 4 years, 4 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 c2ca83fa738ad023e333100328861a5bf2d59a0a..4108795549c377b57ba32dd8dee927b741a8e474 100644
--- a/base/mac/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -448,69 +448,12 @@ int MacOSXMinorVersionInternal() {
return mac_os_x_minor_version;
}
-// Returns the running system's Mac OS X minor version. This is the |y| value
-// in 10.y or 10.y.z.
-int MacOSXMinorVersion() {
- static int mac_os_x_minor_version = MacOSXMinorVersionInternal();
- return mac_os_x_minor_version;
-}
-
-enum {
- MAVERICKS_MINOR_VERSION = 9,
- YOSEMITE_MINOR_VERSION = 10,
- EL_CAPITAN_MINOR_VERSION = 11,
- SIERRA_MINOR_VERSION = 12,
-};
-
} // namespace
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9)
-bool IsOSMavericks() {
- return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION;
-}
-#endif
-
-#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_11)
-bool IsOSElCapitan() {
- return MacOSXMinorVersion() == EL_CAPITAN_MINOR_VERSION;
-}
-#endif
-
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_11)
-bool IsOSElCapitanOrLater() {
- return MacOSXMinorVersion() >= EL_CAPITAN_MINOR_VERSION;
-}
-#endif
-
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_12)
-bool IsOSSierra() {
- return MacOSXMinorVersion() == SIERRA_MINOR_VERSION;
-}
-#endif
-
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_12)
-bool IsOSSierraOrLater() {
- return MacOSXMinorVersion() >= SIERRA_MINOR_VERSION;
-}
-#endif
-
-#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_12)
-bool IsOSLaterThanSierra_DontCallThis() {
- return MacOSXMinorVersion() > SIERRA_MINOR_VERSION;
+int internal::MacOSXMinorVersion() {
Mark Mentovai 2016/08/26 15:27:26 I suppose it’s fine, I just can’t recall ever seei
Sidney San Martín 2016/08/28 21:27:17 Good point. Changed.
+ static int mac_os_x_minor_version = MacOSXMinorVersionInternal();
+ return mac_os_x_minor_version;
}
-#endif
std::string GetModelIdentifier() {
std::string return_string;

Powered by Google App Engine
This is Rietveld 408576698