Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginSystem.cpp

Issue 5750789393874944: [IE] First round of ATL removal (Closed)
Patch Set: Created June 20, 2014, 9:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/plugin/PluginSystem.cpp
===================================================================
--- a/src/plugin/PluginSystem.cpp
+++ b/src/plugin/PluginSystem.cpp
@@ -58,39 +58,36 @@
return system;
}
-CString CPluginSystem::GetBrowserLanguage() const
+std::wstring CPluginSystem::GetBrowserLanguage() const
{
LANGID lcid = ::GetUserDefaultLangID();
- TCHAR language[128];
+ wchar_t language[128];
memset(language, 0, sizeof(language));
- TCHAR country[128];
+ wchar_t country[128];
memset(language, 0, sizeof(country));
- CString lang;
+ std::wstring lang;
int res = ::GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, language, 127);
if (res == 0)
{
- DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, "System::GetBrowserLang - Failed");
+ DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, L"System::GetBrowserLang - Failed");
}
else
{
- lang.Append(language);
+ lang +=language ;
}
-
- lang.Append(L"-");
-
+ lang += L"-";
res = ::GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, country, 127);
if (res == 0)
{
- DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, "System::GetBrowserLang - failed to retrieve country");
+ DEBUG_ERROR_LOG(::GetLastError(), PLUGIN_ERROR_SYSINFO, PLUGIN_ERROR_SYSINFO_BROWSER_LANGUAGE, L"System::GetBrowserLang - failed to retrieve country");
}
else
{
- lang.Append(country);
+ lang += country;
}
-
return lang;
}

Powered by Google App Engine
This is Rietveld