OLD | NEW |
---|---|
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 #include "base/mac/mac_util.h" | 5 #include "base/mac/mac_util.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #import <IOKit/IOKitLib.h> | 8 #import <IOKit/IOKitLib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <sys/utsname.h> | 10 #include <sys/utsname.h> |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 }; | 566 }; |
567 | 567 |
568 } // namespace | 568 } // namespace |
569 | 569 |
570 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) | 570 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) |
571 bool IsOSSnowLeopard() { | 571 bool IsOSSnowLeopard() { |
572 return MacOSXMinorVersion() == SNOW_LEOPARD_MINOR_VERSION; | 572 return MacOSXMinorVersion() == SNOW_LEOPARD_MINOR_VERSION; |
573 } | 573 } |
574 #endif | 574 #endif |
575 | 575 |
576 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) | |
wtc
2012/08/15 02:38:42
This may be incorrect. See my comment in mac_util
| |
577 bool IsOSSnowLeopardOrLater() { | |
578 return MacOSXMinorVersion() >= SNOW_LEOPARD_MINOR_VERSION; | |
579 } | |
580 #endif | |
581 | |
576 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) | 582 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) |
577 bool IsOSLion() { | 583 bool IsOSLion() { |
578 return MacOSXMinorVersion() == LION_MINOR_VERSION; | 584 return MacOSXMinorVersion() == LION_MINOR_VERSION; |
579 } | 585 } |
580 #endif | 586 #endif |
581 | 587 |
582 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) | 588 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) |
583 bool IsOSLionOrEarlier() { | 589 bool IsOSLionOrEarlier() { |
584 return MacOSXMinorVersion() <= LION_MINOR_VERSION; | 590 return MacOSXMinorVersion() <= LION_MINOR_VERSION; |
585 } | 591 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
657 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 663 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
658 return false; | 664 return false; |
659 *type = ident.substr(0, number_loc); | 665 *type = ident.substr(0, number_loc); |
660 *major = major_tmp; | 666 *major = major_tmp; |
661 *minor = minor_tmp; | 667 *minor = minor_tmp; |
662 return true; | 668 return true; |
663 } | 669 } |
664 | 670 |
665 } // namespace mac | 671 } // namespace mac |
666 } // namespace base | 672 } // namespace base |
OLD | NEW |