diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-29 14:16:00 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-29 14:16:00 +0000 |
commit | 1c95c21a98fb96e5e7ca8662a8bfe61e7d5063a8 (patch) | |
tree | d02c206897669a07a1a4f4103d68d858d9ad7d65 /base/ios | |
parent | 54c4a191af0e039d298a8ea3874781a9136fb5a0 (diff) | |
download | chromium_src-1c95c21a98fb96e5e7ca8662a8bfe61e7d5063a8.zip chromium_src-1c95c21a98fb96e5e7ca8662a8bfe61e7d5063a8.tar.gz chromium_src-1c95c21a98fb96e5e7ca8662a8bfe61e7d5063a8.tar.bz2 |
[iOS] Adds a version check function for iOS 7.
BUG=None
TEST=None
Review URL: https://chromiumcodereview.appspot.com/18171002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/ios')
-rw-r--r-- | base/ios/ios_util.h | 7 | ||||
-rw-r--r-- | base/ios/ios_util.mm | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/base/ios/ios_util.h b/base/ios/ios_util.h index 7cc7918..7e2e621 100644 --- a/base/ios/ios_util.h +++ b/base/ios/ios_util.h @@ -11,10 +11,13 @@ namespace base { namespace ios { -// Returns whether the operation system is iOS 6 or later. +// Returns whether the operating system is iOS 6 or later. BASE_EXPORT bool IsRunningOnIOS6OrLater(); -// Returns whether the operation system is at the given version or later. +// Returns whether the operating system is iOS 7 or later. +BASE_EXPORT bool IsRunningOnIOS7OrLater(); + +// Returns whether the operating system is at the given version or later. BASE_EXPORT bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix); } // namespace ios diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm index 2790865..a76911017f 100644 --- a/base/ios/ios_util.mm +++ b/base/ios/ios_util.mm @@ -24,6 +24,10 @@ bool IsRunningOnIOS6OrLater() { return IsRunningOnOrLater(6, 0, 0); } +bool IsRunningOnIOS7OrLater() { + return IsRunningOnOrLater(7, 0, 0); +} + bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) { static const int32* current_version = OSVersionAsArray(); int32 version[] = { major, minor, bug_fix }; |