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

Unified Diff: Source/platform/text/LocaleWin.cpp

Issue 90243005: Have Locale::create() take a String in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « Source/platform/text/LocaleMac.mm ('k') | Source/platform/text/PlatformLocale.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/LocaleWin.cpp
diff --git a/Source/platform/text/LocaleWin.cpp b/Source/platform/text/LocaleWin.cpp
index e68bc83fb0eeaac86c6117933153e9baa2e17a89..f90eafe8f1164e9b1cc336e331f6ed229ffb9c8f 100644
--- a/Source/platform/text/LocaleWin.cpp
+++ b/Source/platform/text/LocaleWin.cpp
@@ -128,7 +128,7 @@ static LCID LCIDFromLocaleInternal(LCID userDefaultLCID, const String& userDefau
return localeNameToLCID(locale.charactersWithNullTermination().data(), 0);
}
-static LCID LCIDFromLocale(const AtomicString& locale, bool defaultsForLocale)
+static LCID LCIDFromLocale(const String& locale, bool defaultsForLocale)
{
// LocaleNameToLCID() is available since Windows Vista.
LocaleNameToLCIDPtr localeNameToLCID = reinterpret_cast<LocaleNameToLCIDPtr>(::GetProcAddress(::GetModuleHandle(L"kernel32"), "LocaleNameToLCID"));
@@ -141,13 +141,13 @@ static LCID LCIDFromLocale(const AtomicString& locale, bool defaultsForLocale)
::GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SISO639LANGNAME | (defaultsForLocale ? LOCALE_NOUSEROVERRIDE : 0), lowercaseLanguageCode, languageCodeBufferSize);
String userDefaultLanguageCode = String(lowercaseLanguageCode);
- LCID lcid = LCIDFromLocaleInternal(LOCALE_USER_DEFAULT, userDefaultLanguageCode, localeNameToLCID, String(locale));
+ LCID lcid = LCIDFromLocaleInternal(LOCALE_USER_DEFAULT, userDefaultLanguageCode, localeNameToLCID, locale);
if (!lcid)
lcid = LCIDFromLocaleInternal(LOCALE_USER_DEFAULT, userDefaultLanguageCode, localeNameToLCID, defaultLanguage());
return lcid;
}
-PassOwnPtr<Locale> Locale::create(const AtomicString& locale)
+PassOwnPtr<Locale> Locale::create(const String& locale)
{
// Whether the default settings for the locale should be used, ignoring user overrides.
bool defaultsForLocale = isRunningLayoutTest();
« no previous file with comments | « Source/platform/text/LocaleMac.mm ('k') | Source/platform/text/PlatformLocale.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698