| Index: third_party/WebKit/Source/platform/mac/VersionUtilMac.h
|
| diff --git a/third_party/WebKit/Source/platform/mac/VersionUtilMac.h b/third_party/WebKit/Source/platform/mac/VersionUtilMac.h
|
| index ccff619df8d9d466d8dc4d1e3271d87e4008d04b..079825f11d010d749beadf0a6d64e2c466350008 100644
|
| --- a/third_party/WebKit/Source/platform/mac/VersionUtilMac.h
|
| +++ b/third_party/WebKit/Source/platform/mac/VersionUtilMac.h
|
| @@ -7,16 +7,26 @@
|
|
|
| #include "platform/PlatformExport.h"
|
|
|
| +#include <AvailabilityMacros.h>
|
| +
|
| namespace blink {
|
|
|
| -// Mavericks is Mac OS X 10.9, Darwin 13.
|
| -PLATFORM_EXPORT bool IsOSMavericks();
|
| +namespace internal {
|
| +
|
| +PLATFORM_EXPORT int MacOSXMinorVersion();
|
| +
|
| +template <int V, int ID>
|
| +constexpr bool IsOS()
|
| +{
|
| + return MAC_OS_X_VERSION_MIN_REQUIRED <= ID && MacOSXMinorVersion() == V;
|
| +}
|
|
|
| -// Yosemite is Mac OS X 10.10, Darwin 14.
|
| -PLATFORM_EXPORT bool IsOSYosemite();
|
| +} // namespace internal
|
|
|
| -// El Capitan is Mac OS X 10.11, Darwin 15.
|
| -PLATFORM_EXPORT bool IsOSElCapitan();
|
| +const auto IsOS10_9 = internal::IsOS<9, 1090>;
|
| +const auto IsOS10_10 = internal::IsOS<10, 101000>;
|
| +const auto IsOS10_11 = internal::IsOS<11, 101100>;
|
| +const auto IsOS10_12 = internal::IsOS<12, 101200>;
|
|
|
| } // namespace blink
|
|
|
|
|