Index: base/ios/ios_util.mm |
diff --git a/base/ios/ios_util.mm b/base/ios/ios_util.mm |
index 627fb403e1980d7b482d848d4bfba846e0fec8ab..515562db0332a2198548e22606ddc15ff62c23fb 100644 |
--- a/base/ios/ios_util.mm |
+++ b/base/ios/ios_util.mm |
@@ -7,6 +7,7 @@ |
#import <Foundation/Foundation.h> |
#include <stddef.h> |
+#include "base/mac/foundation_util.h" |
#include "base/macros.h" |
#include "base/sys_info.h" |
@@ -19,6 +20,9 @@ const int32_t* OSVersionAsArray() { |
&digits[0], &digits[1], &digits[2]); |
return digits; |
} |
+ |
+static NSString* g_icudtl_path_override = nil; |
Mark Mentovai
2016/01/08 18:03:20
You don’t need static, you’re already in an unname
justincohen
2016/01/08 18:16:52
Done.
|
+ |
} // namespace |
namespace base { |
@@ -48,5 +52,14 @@ bool IsInForcedRTL() { |
return [defaults boolForKey:@"NSForceRightToLeftWritingDirection"]; |
} |
+void OverridePathOfEmbeddedICU(const char* path) { |
+ DCHECK(!g_icudtl_path_override); |
+ g_icudtl_path_override = [[NSString stringWithUTF8String:path] copy]; |
Mark Mentovai
2016/01/08 18:03:20
Why are you saving this as an NSString* when it’s
justincohen
2016/01/08 18:16:52
Done.
|
+} |
+ |
+FilePath FilePathOfEmbeddedICU() { |
+ return base::mac::NSStringToFilePath(g_icudtl_path_override); |
+} |
+ |
} // namespace ios |
} // namespace base |