| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/ios/ios_util.h" | 5 #include "base/ios/ios_util.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 return digits; | 21 return digits; |
| 22 } | 22 } |
| 23 | 23 |
| 24 std::string* g_icudtl_path_override = nullptr; | 24 std::string* g_icudtl_path_override = nullptr; |
| 25 | 25 |
| 26 } // namespace | 26 } // namespace |
| 27 | 27 |
| 28 namespace base { | 28 namespace base { |
| 29 namespace ios { | 29 namespace ios { |
| 30 | 30 |
| 31 // When dropping iOS7 support, also address issues listed in crbug.com/502968. | |
| 32 bool IsRunningOnIOS8OrLater() { | |
| 33 return IsRunningOnOrLater(8, 0, 0); | |
| 34 } | |
| 35 | |
| 36 bool IsRunningOnIOS9OrLater() { | 31 bool IsRunningOnIOS9OrLater() { |
| 37 return IsRunningOnOrLater(9, 0, 0); | 32 return IsRunningOnOrLater(9, 0, 0); |
| 38 } | 33 } |
| 39 | 34 |
| 40 bool IsRunningOnIOS10OrLater() { | 35 bool IsRunningOnIOS10OrLater() { |
| 41 return IsRunningOnOrLater(10, 0, 0); | 36 return IsRunningOnOrLater(10, 0, 0); |
| 42 } | 37 } |
| 43 | 38 |
| 44 bool IsRunningOnOrLater(int32_t major, int32_t minor, int32_t bug_fix) { | 39 bool IsRunningOnOrLater(int32_t major, int32_t minor, int32_t bug_fix) { |
| 45 static const int32_t* current_version = OSVersionAsArray(); | 40 static const int32_t* current_version = OSVersionAsArray(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 63 | 58 |
| 64 FilePath FilePathOfEmbeddedICU() { | 59 FilePath FilePathOfEmbeddedICU() { |
| 65 if (g_icudtl_path_override) { | 60 if (g_icudtl_path_override) { |
| 66 return FilePath(*g_icudtl_path_override); | 61 return FilePath(*g_icudtl_path_override); |
| 67 } | 62 } |
| 68 return FilePath(); | 63 return FilePath(); |
| 69 } | 64 } |
| 70 | 65 |
| 71 } // namespace ios | 66 } // namespace ios |
| 72 } // namespace base | 67 } // namespace base |
| OLD | NEW |