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

Side by Side Diff: base/ios/ios_util.mm

Issue 2933963002: [ios] Fix omnibox baseWritingDirection and dismissal iOS11 bugs. (Closed)
Patch Set: more omnibox fixes 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 unified diff | Download patch
OLDNEW
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
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 bool IsRunningOnIOS11OrLater() {
32 return IsRunningOnOrLater(11, 0, 0);
33 }
34
31 bool IsRunningOnIOS10OrLater() { 35 bool IsRunningOnIOS10OrLater() {
32 return IsRunningOnOrLater(10, 0, 0); 36 return IsRunningOnOrLater(10, 0, 0);
33 } 37 }
34 38
35 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) {
36 static const int32_t* current_version = OSVersionAsArray(); 40 static const int32_t* current_version = OSVersionAsArray();
37 int32_t version[] = {major, minor, bug_fix}; 41 int32_t version[] = {major, minor, bug_fix};
38 for (size_t i = 0; i < arraysize(version); i++) { 42 for (size_t i = 0; i < arraysize(version); i++) {
39 if (current_version[i] != version[i]) 43 if (current_version[i] != version[i])
40 return current_version[i] > version[i]; 44 return current_version[i] > version[i];
(...skipping 13 matching lines...) Expand all
54 58
55 FilePath FilePathOfEmbeddedICU() { 59 FilePath FilePathOfEmbeddedICU() {
56 if (g_icudtl_path_override) { 60 if (g_icudtl_path_override) {
57 return FilePath(*g_icudtl_path_override); 61 return FilePath(*g_icudtl_path_override);
58 } 62 }
59 return FilePath(); 63 return FilePath();
60 } 64 }
61 65
62 } // namespace ios 66 } // namespace ios
63 } // namespace base 67 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698