| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 return MacOSXMinorVersion() <= LION_MINOR_VERSION; | 618 return MacOSXMinorVersion() <= LION_MINOR_VERSION; |
| 619 } | 619 } |
| 620 #endif | 620 #endif |
| 621 | 621 |
| 622 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) | 622 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) |
| 623 bool IsOSLionOrLater() { | 623 bool IsOSLionOrLater() { |
| 624 return MacOSXMinorVersion() >= LION_MINOR_VERSION; | 624 return MacOSXMinorVersion() >= LION_MINOR_VERSION; |
| 625 } | 625 } |
| 626 #endif | 626 #endif |
| 627 | 627 |
| 628 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) | |
| 629 bool IsOSLaterThanLion() { | |
| 630 return MacOSXMinorVersion() > LION_MINOR_VERSION; | |
| 631 } | |
| 632 #endif | |
| 633 | |
| 634 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) | 628 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
| 635 bool IsOSMountainLion() { | 629 bool IsOSMountainLion() { |
| 636 return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; | 630 return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; |
| 637 } | 631 } |
| 638 #endif | 632 #endif |
| 639 | 633 |
| 640 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) | 634 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) |
| 641 bool IsOSMountainLionOrLater() { | 635 bool IsOSMountainLionOrLater() { |
| 642 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; | 636 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; |
| 643 } | 637 } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 691 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
| 698 return false; | 692 return false; |
| 699 *type = ident.substr(0, number_loc); | 693 *type = ident.substr(0, number_loc); |
| 700 *major = major_tmp; | 694 *major = major_tmp; |
| 701 *minor = minor_tmp; | 695 *minor = minor_tmp; |
| 702 return true; | 696 return true; |
| 703 } | 697 } |
| 704 | 698 |
| 705 } // namespace mac | 699 } // namespace mac |
| 706 } // namespace base | 700 } // namespace base |
| OLD | NEW |