diff options
author | pkl <pkl@chromium.org> | 2015-07-06 09:14:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-06 16:16:50 +0000 |
commit | ded303e9191639c4fcbe7d77600a5ebd96d180f5 (patch) | |
tree | 517c9443d8aa35de2ffaa6307e1f3421d70cbfae /base/ios | |
parent | 92fddcd70e7247fc3af519e7e2575837c3966e50 (diff) | |
download | chromium_src-ded303e9191639c4fcbe7d77600a5ebd96d180f5.zip chromium_src-ded303e9191639c4fcbe7d77600a5ebd96d180f5.tar.gz chromium_src-ded303e9191639c4fcbe7d77600a5ebd96d180f5.tar.bz2 |
Adds IsRunningOnIOS9OrLater() utility function.
Review URL: https://codereview.chromium.org/1226833002
Cr-Commit-Position: refs/heads/master@{#337405}
Diffstat (limited to 'base/ios')
-rw-r--r-- | base/ios/ios_util.h | 3 | ||||
-rw-r--r-- | base/ios/ios_util.mm | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/base/ios/ios_util.h b/base/ios/ios_util.h index d9d7e19..688fbf3 100644 --- a/base/ios/ios_util.h +++ b/base/ios/ios_util.h @@ -14,6 +14,9 @@ namespace ios { // Returns whether the operating system is iOS 8 or later. BASE_EXPORT bool IsRunningOnIOS8OrLater(); +// Returns whether the operating system is iOS 9 or later. +BASE_EXPORT bool IsRunningOnIOS9OrLater(); + // Returns whether the operating system is at the given version or later. BASE_EXPORT bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix); diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm index 817eec4..d920045 100644 --- a/base/ios/ios_util.mm +++ b/base/ios/ios_util.mm @@ -25,6 +25,10 @@ bool IsRunningOnIOS8OrLater() { return IsRunningOnOrLater(8, 0, 0); } +bool IsRunningOnIOS9OrLater() { + return IsRunningOnOrLater(9, 0, 0); +} + bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) { static const int32* current_version = OSVersionAsArray(); int32 version[] = { major, minor, bug_fix }; |