diff options
author | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-22 08:04:11 +0000 |
---|---|---|
committer | jshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-22 08:04:11 +0000 |
commit | 4f945a09c6105d647f88c481ec8819fad522b296 (patch) | |
tree | 8ae8835eee515d77f5b16143e0b7f9459ff1abdc | |
parent | 760614992de625ae87208231ccdcbfe836dc8739 (diff) | |
download | chromium_src-4f945a09c6105d647f88c481ec8819fad522b296.zip chromium_src-4f945a09c6105d647f88c481ec8819fad522b296.tar.gz chromium_src-4f945a09c6105d647f88c481ec8819fad522b296.tar.bz2 |
Use U_ICU_VERSION_SHORT instead of hard-coding the icu data dll and module name.
This is a companion to http://codereview.chromium.org/174265
BUG=8198
TEST=All the targets relying on ICU are built and run without a problem.
Review URL: http://codereview.chromium.org/173233
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24072 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/icu_util.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/base/icu_util.cc b/base/icu_util.cc index 701dc73..0f42395 100644 --- a/base/icu_util.cc +++ b/base/icu_util.cc @@ -16,6 +16,7 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/path_service.h" +#include "base/string_util.h" #include "base/sys_string_conversions.h" #include "unicode/putil.h" #include "unicode/udata.h" @@ -37,8 +38,8 @@ #endif // ICU_UTIL_DATA_IMPL #if defined(OS_WIN) -#define ICU_UTIL_DATA_SYMBOL "icudt38_dat" -#define ICU_UTIL_DATA_SHARED_MODULE_NAME L"icudt38.dll" +#define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat" +#define ICU_UTIL_DATA_SHARED_MODULE_NAME "icudt" U_ICU_VERSION_SHORT ".dll" #endif namespace icu_util { @@ -57,7 +58,8 @@ bool Initialize() { // We expect to find the ICU data module alongside the current module. std::wstring data_path; PathService::Get(base::DIR_MODULE, &data_path); - file_util::AppendToPath(&data_path, ICU_UTIL_DATA_SHARED_MODULE_NAME); + file_util::AppendToPath(&data_path, + ASCIIToWide(ICU_UTIL_DATA_SHARED_MODULE_NAME)); HMODULE module = LoadLibrary(data_path.c_str()); if (!module) |