Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3058)

Unified Diff: base/ios/ios_util.mm

Issue 2935973002: iOS: Cache the result of IsRunningOnIOS10OrLater() (Closed)
Patch Set: Caching simplification Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/ios/ios_util.mm
diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm
index de9adb92ca141a922a78fd2a0da734f9dccbc695..2402d30ab06a89542c67b1c9e03149b4bb54e6ae 100644
--- a/base/ios/ios_util.mm
+++ b/base/ios/ios_util.mm
@@ -29,11 +29,13 @@ namespace base {
namespace ios {
bool IsRunningOnIOS10OrLater() {
- return IsRunningOnOrLater(10, 0, 0);
+ static const bool is_running_on_or_later = IsRunningOnOrLater(10, 0, 0);
+ return is_running_on_or_later;
}
bool IsRunningOnIOS11OrLater() {
- return IsRunningOnOrLater(11, 0, 0);
+ static const bool is_running_on_or_later = IsRunningOnOrLater(11, 0, 0);
+ return is_running_on_or_later;
}
bool IsRunningOnOrLater(int32_t major, int32_t minor, int32_t bug_fix) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698