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

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

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 #import "platform/mac/VersionUtilMac.h" 5 #import "platform/mac/VersionUtilMac.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 #include <sys/utsname.h> 9 #include <sys/utsname.h>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Returns the running system's Mac OS X minor version. This is the |y| value 51 // Returns the running system's Mac OS X minor version. This is the |y| value
52 // in 10.y or 10.y.z. 52 // in 10.y or 10.y.z.
53 int MacOSXMinorVersion() 53 int MacOSXMinorVersion()
54 { 54 {
55 static int minorVersion = MacOSXMinorVersionInternal(); 55 static int minorVersion = MacOSXMinorVersionInternal();
56 return minorVersion; 56 return minorVersion;
57 } 57 }
58 58
59 enum { 59 enum {
60 SNOW_LEOPARD_MINOR_VERSION = 6,
61 LION_MINOR_VERSION = 7, 60 LION_MINOR_VERSION = 7,
62 MAVERICKS_MINOR_VERSION = 9, 61 MAVERICKS_MINOR_VERSION = 9,
63 YOSEMITE_MINOR_VERSION = 10, 62 YOSEMITE_MINOR_VERSION = 10,
64 EL_CAPITAN_MINOR_VERSION = 11, 63 EL_CAPITAN_MINOR_VERSION = 11,
65 }; 64 };
66 65
67 } // namespace 66 } // namespace
68 67
69 namespace blink { 68 namespace blink {
70 69
71 bool IsOSSnowLeopard()
72 {
73 return MacOSXMinorVersion() == SNOW_LEOPARD_MINOR_VERSION;
74 }
75
76 bool IsOSLionOrEarlier() 70 bool IsOSLionOrEarlier()
77 { 71 {
78 return MacOSXMinorVersion() <= LION_MINOR_VERSION; 72 return MacOSXMinorVersion() <= LION_MINOR_VERSION;
79 } 73 }
80 74
81 bool IsOSMavericksOrEarlier() 75 bool IsOSMavericksOrEarlier()
82 { 76 {
83 return MacOSXMinorVersion() <= MAVERICKS_MINOR_VERSION; 77 return MacOSXMinorVersion() <= MAVERICKS_MINOR_VERSION;
84 } 78 }
85 79
86 bool IsOSMavericks() 80 bool IsOSMavericks()
87 { 81 {
88 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION; 82 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION;
89 } 83 }
90 84
91 bool IsOSYosemite() 85 bool IsOSYosemite()
92 { 86 {
93 return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION; 87 return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION;
94 } 88 }
95 89
96 bool IsOSElCapitan() 90 bool IsOSElCapitan()
97 { 91 {
98 return MacOSXMinorVersion() == EL_CAPITAN_MINOR_VERSION; 92 return MacOSXMinorVersion() == EL_CAPITAN_MINOR_VERSION;
99 } 93 }
100 94
101 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/mac/VersionUtilMac.h ('k') | third_party/WebKit/Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698