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

Unified Diff: base/i18n/icu_util.cc

Issue 1568363002: [iOS] Allow overriding icuctl.dat file location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Less string copies Created 4 years, 11 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 | base/ios/ios_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/icu_util.cc
diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc
index d7e45c3400d3419501f6feb70c6e7cae9e560ba4..08dbeb3c14c5dd50dd8e534f1e18625bf639c6d8 100644
--- a/base/i18n/icu_util.cc
+++ b/base/i18n/icu_util.cc
@@ -28,6 +28,10 @@
#include "base/android/apk_assets.h"
#endif
+#if defined(OS_IOS)
+#include "base/ios/ios_util.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/foundation_util.h"
#endif
@@ -124,6 +128,12 @@ void LazyInitIcuDataFile() {
ScopedCFTypeRef<CFStringRef> data_file_name(
SysUTF8ToCFStringRef(kIcuDataFileName));
FilePath data_path = mac::PathForFrameworkBundleResource(data_file_name);
+#if defined(OS_IOS)
+ FilePath override_data_path = base::ios::FilePathOfEmbeddedICU();
+ if (!override_data_path.empty()) {
+ data_path = override_data_path;
+ }
+#endif // !defined(OS_IOS)
if (data_path.empty()) {
LOG(ERROR) << kIcuDataFileName << " not found in bundle";
return;
« no previous file with comments | « no previous file | base/ios/ios_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698