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

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

Issue 1299713004: Reland #2: Add a short term solution to fix OSX 10.11 system font rendering problems. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against top of tree. Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/platform/mac/VersionUtilMac.h ('k') | Source/platform/mac/VersionUtilMacTest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #import "config.h"
6 #import "platform/mac/VersionUtilMac.h" 6 #import "platform/mac/VersionUtilMac.h"
7 7
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 #include <sys/utsname.h> 10 #include <sys/utsname.h>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // in 10.y or 10.y.z. 53 // in 10.y or 10.y.z.
54 int MacOSXMinorVersion() 54 int MacOSXMinorVersion()
55 { 55 {
56 static int minorVersion = MacOSXMinorVersionInternal(); 56 static int minorVersion = MacOSXMinorVersionInternal();
57 return minorVersion; 57 return minorVersion;
58 } 58 }
59 59
60 enum { 60 enum {
61 LION_MINOR_VERSION = 7, 61 LION_MINOR_VERSION = 7,
62 MAVERICKS_MINOR_VERSION = 9, 62 MAVERICKS_MINOR_VERSION = 9,
63 YOSEMITE_MINOR_VERSION = 10,
64 EL_CAPITAN_MINOR_VERSION = 11,
63 }; 65 };
64 66
65 } // namespace 67 } // namespace
66 68
67 namespace blink { 69 namespace blink {
68 70
69 bool IsOSLionOrEarlier() 71 bool IsOSLionOrEarlier()
70 { 72 {
71 return MacOSXMinorVersion() <= LION_MINOR_VERSION; 73 return MacOSXMinorVersion() <= LION_MINOR_VERSION;
72 } 74 }
73 75
74 bool IsOSMavericksOrEarlier() 76 bool IsOSMavericksOrEarlier()
75 { 77 {
76 return MacOSXMinorVersion() <= MAVERICKS_MINOR_VERSION; 78 return MacOSXMinorVersion() <= MAVERICKS_MINOR_VERSION;
77 } 79 }
78 80
79 bool IsOSMavericks() 81 bool IsOSMavericks()
80 { 82 {
81 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION; 83 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION;
82 } 84 }
83 85
86 bool IsOSYosemite()
87 {
88 return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION;
89 }
90
91 bool IsOSElCapitan()
92 {
93 return MacOSXMinorVersion() == EL_CAPITAN_MINOR_VERSION;
94 }
95
84 } // namespace blink 96 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/mac/VersionUtilMac.h ('k') | Source/platform/mac/VersionUtilMacTest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698