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

Side by Side Diff: third_party/WebKit/Source/platform/mac/VersionUtilMac.h

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VersionUtilMac_h 5 #ifndef VersionUtilMac_h
6 #define VersionUtilMac_h 6 #define VersionUtilMac_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 9
10 #include <AvailabilityMacros.h>
11
10 namespace blink { 12 namespace blink {
11 13
12 // Mavericks is Mac OS X 10.9, Darwin 13. 14 namespace internal {
13 PLATFORM_EXPORT bool IsOSMavericks();
14 15
15 // Yosemite is Mac OS X 10.10, Darwin 14. 16 PLATFORM_EXPORT int MacOSXMinorVersion();
Sidney San Martín 2016/08/24 20:07:13 dglazkov@: These functions also exist in base/mac/
16 PLATFORM_EXPORT bool IsOSYosemite();
17 17
18 // El Capitan is Mac OS X 10.11, Darwin 15. 18 template <int V, int ID>
19 PLATFORM_EXPORT bool IsOSElCapitan(); 19 constexpr bool IsOS()
20 {
21 return (!ID || MAC_OS_X_VERSION_MIN_REQUIRED <= ID) && MacOSXMinorVersion() == V;
22 }
23
24 } // namespace internal
25
26 const auto IsOS10_9 = internal::IsOS<9, MAC_OS_X_VERSION_10_9>;
27 const auto IsOS10_10 = internal::IsOS<10, MAC_OS_X_VERSION_10_10>;
28 const auto IsOS10_11 = internal::IsOS<11, MAC_OS_X_VERSION_10_11>;
20 29
21 } // namespace blink 30 } // namespace blink
22 31
23 #endif // VersionUtilMac_h 32 #endif // VersionUtilMac_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698