| 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 597 } |
| 598 #endif | 598 #endif |
| 599 | 599 |
| 600 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) | 600 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) |
| 601 bool IsOSMountainLionOrLater() { | 601 bool IsOSMountainLionOrLater() { |
| 602 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; | 602 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; |
| 603 } | 603 } |
| 604 #endif | 604 #endif |
| 605 | 605 |
| 606 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) | 606 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
| 607 bool IsOSDangerouslyLaterThanMountainLionForUseByCFAllocatorReplacement() { | 607 bool IsOSLaterThanMountainLion_DontCallThis() { |
| 608 return MacOSXMinorVersion() > MOUNTAIN_LION_MINOR_VERSION; | 608 return MacOSXMinorVersion() > MOUNTAIN_LION_MINOR_VERSION; |
| 609 } | 609 } |
| 610 #endif | 610 #endif |
| 611 | 611 |
| 612 namespace { | 612 namespace { |
| 613 | 613 |
| 614 // ScopedGenericObj functor for IOObjectRelease(). | 614 // ScopedGenericObj functor for IOObjectRelease(). |
| 615 class ScopedReleaseIOObject { | 615 class ScopedReleaseIOObject { |
| 616 public: | 616 public: |
| 617 void operator()(io_object_t x) const { | 617 void operator()(io_object_t x) const { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 657 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
| 658 return false; | 658 return false; |
| 659 *type = ident.substr(0, number_loc); | 659 *type = ident.substr(0, number_loc); |
| 660 *major = major_tmp; | 660 *major = major_tmp; |
| 661 *minor = minor_tmp; | 661 *minor = minor_tmp; |
| 662 return true; | 662 return true; |
| 663 } | 663 } |
| 664 | 664 |
| 665 } // namespace mac | 665 } // namespace mac |
| 666 } // namespace base | 666 } // namespace base |
| OLD | NEW |