Commit 2f3869f9 authored by sdefresne's avatar sdefresne Committed by Commit bot

New function IsRunningOnIOS8OrLater

Similar to IsRunningOnIOS7OrLater except that it checks for
iOS 8 or later.

BUG=None

Review URL: https://codereview.chromium.org/604763002

Cr-Commit-Position: refs/heads/master@{#296710}
parent 6299e2db
...@@ -14,6 +14,9 @@ namespace ios { ...@@ -14,6 +14,9 @@ namespace ios {
// Returns whether the operating system is iOS 7 or later. // Returns whether the operating system is iOS 7 or later.
BASE_EXPORT bool IsRunningOnIOS7OrLater(); BASE_EXPORT bool IsRunningOnIOS7OrLater();
// Returns whether the operating system is iOS 8 or later.
BASE_EXPORT bool IsRunningOnIOS8OrLater();
// Returns whether the operating system is at the given version or later. // Returns whether the operating system is at the given version or later.
BASE_EXPORT bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix); BASE_EXPORT bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix);
......
...@@ -24,6 +24,10 @@ bool IsRunningOnIOS7OrLater() { ...@@ -24,6 +24,10 @@ bool IsRunningOnIOS7OrLater() {
return IsRunningOnOrLater(7, 0, 0); return IsRunningOnOrLater(7, 0, 0);
} }
bool IsRunningOnIOS8OrLater() {
return IsRunningOnOrLater(8, 0, 0);
}
bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) { bool IsRunningOnOrLater(int32 major, int32 minor, int32 bug_fix) {
static const int32* current_version = OSVersionAsArray(); static const int32* current_version = OSVersionAsArray();
int32 version[] = { major, minor, bug_fix }; int32 version[] = { major, minor, bug_fix };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment