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

Side by Side Diff: base/mac/mac_util.h

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
« no previous file with comments | « no previous file | base/mac/mac_util.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 BASE_MAC_MAC_UTIL_H_ 5 #ifndef BASE_MAC_MAC_UTIL_H_
6 #define BASE_MAC_MAC_UTIL_H_ 6 #define BASE_MAC_MAC_UTIL_H_
7 7
8 #include <AvailabilityMacros.h> 8 #include <AvailabilityMacros.h>
9 #include <Carbon/Carbon.h> 9 #include <Carbon/Carbon.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Remove the quarantine xattr from the given file. Returns false if there was 113 // Remove the quarantine xattr from the given file. Returns false if there was
114 // an error, or true otherwise. 114 // an error, or true otherwise.
115 BASE_EXPORT bool RemoveQuarantineAttribute(const FilePath& file_path); 115 BASE_EXPORT bool RemoveQuarantineAttribute(const FilePath& file_path);
116 116
117 // Run-time OS version checks. Use these instead of 117 // Run-time OS version checks. Use these instead of
118 // base::SysInfo::OperatingSystemVersionNumbers. Prefer the "OrEarlier" and 118 // base::SysInfo::OperatingSystemVersionNumbers. Prefer the "OrEarlier" and
119 // "OrLater" variants to those that check for a specific version, unless you 119 // "OrLater" variants to those that check for a specific version, unless you
120 // know for sure that you need to check for a specific version. 120 // know for sure that you need to check for a specific version.
121 121
122 // Snow Leopard is Mac OS X 10.6, Darwin 10.
123 BASE_EXPORT bool IsOSSnowLeopard();
124
125 // Lion is Mac OS X 10.7, Darwin 11. 122 // Lion is Mac OS X 10.7, Darwin 11.
126 BASE_EXPORT bool IsOSLion(); 123 BASE_EXPORT bool IsOSLion();
127 BASE_EXPORT bool IsOSLionOrEarlier(); 124 BASE_EXPORT bool IsOSLionOrEarlier();
128 BASE_EXPORT bool IsOSLionOrLater(); 125 BASE_EXPORT bool IsOSLionOrLater();
129 126
130 // Mountain Lion is Mac OS X 10.8, Darwin 12. 127 // Mountain Lion is Mac OS X 10.8, Darwin 12.
131 BASE_EXPORT bool IsOSMountainLion(); 128 BASE_EXPORT bool IsOSMountainLion();
132 BASE_EXPORT bool IsOSMountainLionOrEarlier(); 129 BASE_EXPORT bool IsOSMountainLionOrEarlier();
133 BASE_EXPORT bool IsOSMountainLionOrLater(); 130 BASE_EXPORT bool IsOSMountainLionOrLater();
134 131
(...skipping 24 matching lines...) Expand all
159 inline bool IsOSYosemiteOrEarlier() { return !IsOSElCapitanOrLater(); } 156 inline bool IsOSYosemiteOrEarlier() { return !IsOSElCapitanOrLater(); }
160 157
161 // When the deployment target is set, the code produced cannot run on earlier 158 // When the deployment target is set, the code produced cannot run on earlier
162 // OS releases. That enables some of the IsOS* family to be implemented as 159 // OS releases. That enables some of the IsOS* family to be implemented as
163 // constant-value inline functions. The MAC_OS_X_VERSION_MIN_REQUIRED macro 160 // constant-value inline functions. The MAC_OS_X_VERSION_MIN_REQUIRED macro
164 // contains the value of the deployment target. 161 // contains the value of the deployment target.
165 162
166 #if defined(MAC_OS_X_VERSION_10_7) && \ 163 #if defined(MAC_OS_X_VERSION_10_7) && \
167 MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 164 MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
168 #define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7 165 #define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7
169 inline bool IsOSSnowLeopard() { return false; }
170 inline bool IsOSLionOrLater() { return true; } 166 inline bool IsOSLionOrLater() { return true; }
171 #endif 167 #endif
172 168
173 #if defined(MAC_OS_X_VERSION_10_7) && \ 169 #if defined(MAC_OS_X_VERSION_10_7) && \
174 MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7 170 MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7
175 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7 171 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7
176 inline bool IsOSLion() { return false; } 172 inline bool IsOSLion() { return false; }
177 #endif 173 #endif
178 174
179 #if defined(MAC_OS_X_VERSION_10_8) && \ 175 #if defined(MAC_OS_X_VERSION_10_8) && \
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // If any error occurs, none of the input pointers are touched. 230 // If any error occurs, none of the input pointers are touched.
235 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident, 231 BASE_EXPORT bool ParseModelIdentifier(const std::string& ident,
236 std::string* type, 232 std::string* type,
237 int32_t* major, 233 int32_t* major,
238 int32_t* minor); 234 int32_t* minor);
239 235
240 } // namespace mac 236 } // namespace mac
241 } // namespace base 237 } // namespace base
242 238
243 #endif // BASE_MAC_MAC_UTIL_H_ 239 #endif // BASE_MAC_MAC_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/mac/mac_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698