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 <errno.h> | 9 #include <errno.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 SNOW_LEOPARD_MINOR_VERSION = 6, | 459 SNOW_LEOPARD_MINOR_VERSION = 6, |
460 LION_MINOR_VERSION = 7, | 460 LION_MINOR_VERSION = 7, |
461 MOUNTAIN_LION_MINOR_VERSION = 8, | 461 MOUNTAIN_LION_MINOR_VERSION = 8, |
462 MAVERICKS_MINOR_VERSION = 9, | 462 MAVERICKS_MINOR_VERSION = 9, |
463 YOSEMITE_MINOR_VERSION = 10, | 463 YOSEMITE_MINOR_VERSION = 10, |
464 EL_CAPITAN_MINOR_VERSION = 11, | 464 EL_CAPITAN_MINOR_VERSION = 11, |
465 }; | 465 }; |
466 | 466 |
467 } // namespace | 467 } // namespace |
468 | 468 |
469 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) | |
470 bool IsOSLion() { | |
471 return MacOSXMinorVersion() == LION_MINOR_VERSION; | |
472 } | |
473 #endif | |
474 | |
475 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) | |
476 bool IsOSLionOrLater() { | |
477 return MacOSXMinorVersion() >= LION_MINOR_VERSION; | |
478 } | |
479 #endif | |
480 | |
481 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) | 469 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_8) |
482 bool IsOSMountainLion() { | 470 bool IsOSMountainLion() { |
483 return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; | 471 return MacOSXMinorVersion() == MOUNTAIN_LION_MINOR_VERSION; |
484 } | 472 } |
485 #endif | 473 #endif |
486 | 474 |
487 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) | 475 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_8) |
488 bool IsOSMountainLionOrLater() { | 476 bool IsOSMountainLionOrLater() { |
489 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; | 477 return MacOSXMinorVersion() >= MOUNTAIN_LION_MINOR_VERSION; |
490 } | 478 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 558 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
571 return false; | 559 return false; |
572 *type = ident.substr(0, number_loc); | 560 *type = ident.substr(0, number_loc); |
573 *major = major_tmp; | 561 *major = major_tmp; |
574 *minor = minor_tmp; | 562 *minor = minor_tmp; |
575 return true; | 563 return true; |
576 } | 564 } |
577 | 565 |
578 } // namespace mac | 566 } // namespace mac |
579 } // namespace base | 567 } // namespace base |
OLD | NEW |