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

Unified Diff: base/i18n/icu_util.cc

Issue 109013004: Use icudat*.dat file on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: same as ps 3(git cl upload test) Created 7 years 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
Index: base/i18n/icu_util.cc
diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc
index e5c698475e4ad9f7710ce3edc3c2a0d1839ba38b..84a0ba6c1da1d06d025a15be2c6043527cefa334 100644
--- a/base/i18n/icu_util.cc
+++ b/base/i18n/icu_util.cc
@@ -30,7 +30,10 @@
#define ICU_UTIL_DATA_STATIC 2
#if ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE
-#define ICU_UTIL_DATA_FILE_NAME "icudt" U_ICU_VERSION_SHORT "l.dat"
+// Use an unversioned file name to simplify a icu version update down the road.
+// No need to change the filename in multiple places (gyp files, windows
+// build pkg configurations, etc).
+#define ICU_UTIL_DATA_FILE_NAME "icudtl.dat"
#elif ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_SHARED
#define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat"
#if defined(OS_WIN)
@@ -86,7 +89,6 @@ bool InitializeICU() {
// be released.
CR_DEFINE_STATIC_LOCAL(base::MemoryMappedFile, mapped_file, ());
if (!mapped_file.IsValid()) {
- // Assume it is in the framework bundle's Resources directory.
#if !defined(OS_MACOSX)
// For now, expect the data file to be alongside the executable.
// This is sufficient while we work on unit tests, but will eventually
@@ -96,6 +98,7 @@ bool InitializeICU() {
DCHECK(path_ok);
data_path = data_path.AppendASCII(ICU_UTIL_DATA_FILE_NAME);
#else
+ // Assume it is in the framework bundle's Resources directory.
FilePath data_path =
base::mac::PathForFrameworkBundleResource(CFSTR(ICU_UTIL_DATA_FILE_NAME));
if (data_path.empty()) {
« no previous file with comments | « base/base.gyp ('k') | build/common.gypi » ('j') | chrome/chrome_dll_bundle.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698