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

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: 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..70c8b65b419e1441cbf4f68dbdba363c4423cf41 100644
--- a/base/i18n/icu_util.cc
+++ b/base/i18n/icu_util.cc
@@ -13,6 +13,9 @@
#include "base/debug/alias.h"
#include "base/files/file_path.h"
#include "base/files/memory_mapped_file.h"
+#if defined(OS_IOS)
+#include "base/ios/ios_util.h"
rohitrao (ping after 24h) 2016/01/08 17:47:05 This should go between the OS_ANDROID and OS_MAC b
+#endif
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
@@ -124,6 +127,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