| Index: sandbox/win/src/target_services.cc
|
| diff --git a/sandbox/win/src/target_services.cc b/sandbox/win/src/target_services.cc
|
| index 7537245b655b88f4d0c42d80b70b9d9e3a681d5e..2c037b9f3ce069849a2067514c9e37f36d8ecb32 100644
|
| --- a/sandbox/win/src/target_services.cc
|
| +++ b/sandbox/win/src/target_services.cc
|
| @@ -76,26 +76,23 @@ bool WarmupWindowsLocales() {
|
| // warmup all of these functions, but let's not assume that.
|
| ::GetUserDefaultLangID();
|
| ::GetUserDefaultLCID();
|
| - if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
|
| - static GetUserDefaultLocaleNameFunction GetUserDefaultLocaleName_func =
|
| - NULL;
|
| + static GetUserDefaultLocaleNameFunction GetUserDefaultLocaleName_func =
|
| + NULL;
|
| + if (!GetUserDefaultLocaleName_func) {
|
| + HMODULE kernel32_dll = ::GetModuleHandle(kKernel32DllName);
|
| + if (!kernel32_dll) {
|
| + return false;
|
| + }
|
| + GetUserDefaultLocaleName_func =
|
| + reinterpret_cast<GetUserDefaultLocaleNameFunction>(
|
| + GetProcAddress(kernel32_dll, "GetUserDefaultLocaleName"));
|
| if (!GetUserDefaultLocaleName_func) {
|
| - HMODULE kernel32_dll = ::GetModuleHandle(kKernel32DllName);
|
| - if (!kernel32_dll) {
|
| - return false;
|
| - }
|
| - GetUserDefaultLocaleName_func =
|
| - reinterpret_cast<GetUserDefaultLocaleNameFunction>(
|
| - GetProcAddress(kernel32_dll, "GetUserDefaultLocaleName"));
|
| - if (!GetUserDefaultLocaleName_func) {
|
| - return false;
|
| - }
|
| + return false;
|
| }
|
| - wchar_t localeName[LOCALE_NAME_MAX_LENGTH] = {0};
|
| - return (0 != GetUserDefaultLocaleName_func(
|
| - localeName, LOCALE_NAME_MAX_LENGTH * sizeof(wchar_t)));
|
| }
|
| - return true;
|
| + wchar_t localeName[LOCALE_NAME_MAX_LENGTH] = {0};
|
| + return (0 != GetUserDefaultLocaleName_func(
|
| + localeName, LOCALE_NAME_MAX_LENGTH * sizeof(wchar_t)));
|
| }
|
|
|
| // Used as storage for g_target_services, because other allocation facilities
|
|
|