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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 }; | 463 }; |
464 | 464 |
465 } // namespace | 465 } // namespace |
466 | 466 |
467 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9) | 467 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_9) |
468 bool IsOSMavericks() { | 468 bool IsOSMavericks() { |
469 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION; | 469 return MacOSXMinorVersion() == MAVERICKS_MINOR_VERSION; |
470 } | 470 } |
471 #endif | 471 #endif |
472 | 472 |
473 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_9) | |
474 bool IsOSMavericksOrLater() { | |
475 return MacOSXMinorVersion() >= MAVERICKS_MINOR_VERSION; | |
476 } | |
477 #endif | |
478 | |
479 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10) | 473 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_10) |
480 bool IsOSYosemite() { | 474 bool IsOSYosemite() { |
481 return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION; | 475 return MacOSXMinorVersion() == YOSEMITE_MINOR_VERSION; |
482 } | 476 } |
483 #endif | 477 #endif |
484 | 478 |
485 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10) | 479 #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_10) |
486 bool IsOSYosemiteOrLater() { | 480 bool IsOSYosemiteOrLater() { |
487 return MacOSXMinorVersion() >= YOSEMITE_MINOR_VERSION; | 481 return MacOSXMinorVersion() >= YOSEMITE_MINOR_VERSION; |
488 } | 482 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) | 550 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) |
557 return false; | 551 return false; |
558 *type = ident.substr(0, number_loc); | 552 *type = ident.substr(0, number_loc); |
559 *major = major_tmp; | 553 *major = major_tmp; |
560 *minor = minor_tmp; | 554 *minor = minor_tmp; |
561 return true; | 555 return true; |
562 } | 556 } |
563 | 557 |
564 } // namespace mac | 558 } // namespace mac |
565 } // namespace base | 559 } // namespace base |
OLD | NEW |