diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-15 20:05:06 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-15 20:05:06 +0000 |
commit | 7f921f2a2039ee8dd0e6755bdb88585eda196ba6 (patch) | |
tree | c73b1ec1154ea45be632d601302ee12a8df21dda /base | |
parent | 78396fb4be7aadc84fc7949d731b87ffc4da0efd (diff) | |
download | chromium_src-7f921f2a2039ee8dd0e6755bdb88585eda196ba6.zip chromium_src-7f921f2a2039ee8dd0e6755bdb88585eda196ba6.tar.gz chromium_src-7f921f2a2039ee8dd0e6755bdb88585eda196ba6.tar.bz2 |
Add three more possibilites for inlining for the base::mac::IsOS* family.
BUG=85972
TEST=base_unittests MacUtilTest.IsOSEllipsis
Review URL: http://codereview.chromium.org/7172022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89241 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/mac/mac_util.h | 3 | ||||
-rw-r--r-- | base/mac/mac_util.mm | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h index 990a543..0d101c9 100644 --- a/base/mac/mac_util.h +++ b/base/mac/mac_util.h @@ -148,6 +148,7 @@ bool IsOSLaterThanLion(); #if defined(MAC_OS_X_VERSION_10_6) && \ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 #define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_6 +inline bool IsOSLeopard() { return false; } inline bool IsOSLeopardOrEarlier() { return false; } inline bool IsOSSnowLeopardOrLater() { return true; } #endif @@ -155,6 +156,7 @@ inline bool IsOSSnowLeopardOrLater() { return true; } #if defined(MAC_OS_X_VERSION_10_7) && \ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 #define BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7 +inline bool IsOSSnowLeopard() { return false; } inline bool IsOSSnowLeopardOrEarlier() { return false; } inline bool IsOSLionOrLater() { return true; } #endif @@ -162,6 +164,7 @@ inline bool IsOSLionOrLater() { return true; } #if defined(MAC_OS_X_VERSION_10_7) && \ MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_7 #define BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7 +inline bool IsOSLion() { return false; } inline bool IsOSLaterThanLion() { return true; } #endif diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm index 0b6bca7..100f23a 100644 --- a/base/mac/mac_util.mm +++ b/base/mac/mac_util.mm @@ -566,9 +566,11 @@ enum { } // namespace +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_6) bool IsOSLeopard() { return MacOSXMinorVersion() == LEOPARD_MINOR_VERSION; } +#endif #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_6) bool IsOSLeopardOrEarlier() { @@ -576,9 +578,11 @@ bool IsOSLeopardOrEarlier() { } #endif +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) bool IsOSSnowLeopard() { return MacOSXMinorVersion() == SNOW_LEOPARD_MINOR_VERSION; } +#endif #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) bool IsOSSnowLeopardOrEarlier() { @@ -592,9 +596,11 @@ bool IsOSSnowLeopardOrLater() { } #endif +#if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GT_10_7) bool IsOSLion() { return MacOSXMinorVersion() == LION_MINOR_VERSION; } +#endif #if !defined(BASE_MAC_MAC_UTIL_H_INLINED_GE_10_7) bool IsOSLionOrLater() { |