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; |
} |
} |