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

Unified Diff: base/i18n/icu_util.cc

Issue 99473012: Enable icu_use_data_file on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: load icudtl.dat in DIR_MODULE instead of DIR_EXE on WIndows Created 6 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 | « base/base.gyp ('k') | build/common.gypi » ('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 6ba925d7b55c095bec8e1e5ea9951176280416b9..5fa37f848e050a419bc074a81f12135cf1d2b2ac 100644
--- a/base/i18n/icu_util.cc
+++ b/base/i18n/icu_util.cc
@@ -90,11 +90,16 @@ bool InitializeICU() {
CR_DEFINE_STATIC_LOCAL(base::MemoryMappedFile, mapped_file, ());
if (!mapped_file.IsValid()) {
#if !defined(OS_MACOSX)
+ FilePath data_path;
+#if defined(OS_WIN)
+ // The data file will be in the same directory as the current module.
+ bool path_ok = PathService::Get(base::DIR_MODULE, &data_path);
+#else
// For now, expect the data file to be alongside the executable.
// This is sufficient while we work on unit tests, but will eventually
// likely live in a data directory.
- FilePath data_path;
bool path_ok = PathService::Get(base::DIR_EXE, &data_path);
+#endif
DCHECK(path_ok);
data_path = data_path.AppendASCII(ICU_UTIL_DATA_FILE_NAME);
#else
@@ -107,7 +112,7 @@ bool InitializeICU() {
}
#endif // OS check
if (!mapped_file.Initialize(data_path)) {
- DLOG(ERROR) << "Couldn't mmap " << data_path.value();
+ DLOG(ERROR) << "Couldn't mmap " << data_path.AsUTF8Unsafe();
return false;
}
}
« no previous file with comments | « base/base.gyp ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698