mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
r=dougt. 10465. the User Agent language portion now comes from a pref because the iLocaleService is the OS setting and we want app level l10n settings in teh UA string
This commit is contained in:
parent
ae42b74f23
commit
7b08f968cc
@ -1056,19 +1056,6 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
|
||||
widgetInit.mWindowType = eWindowType_child;
|
||||
}
|
||||
|
||||
// Set the language portion of the user agent. :)
|
||||
NS_WITH_SERVICE(nsILocaleService, localeServ, kLocaleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRUnichar *UALang;
|
||||
rv = localeServ->GetLocaleComponentForUserAgent(&UALang);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_WITH_SERVICE(nsIIOService, ioServ, kIOServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = ioServ->SetLanguage(UALang);
|
||||
nsAllocator::Free(UALang);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
@ -1056,19 +1056,6 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
|
||||
widgetInit.mWindowType = eWindowType_child;
|
||||
}
|
||||
|
||||
// Set the language portion of the user agent. :)
|
||||
NS_WITH_SERVICE(nsILocaleService, localeServ, kLocaleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
PRUnichar *UALang;
|
||||
rv = localeServ->GetLocaleComponentForUserAgent(&UALang);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
NS_WITH_SERVICE(nsIIOService, ioServ, kIOServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = ioServ->SetLanguage(UALang);
|
||||
nsAllocator::Free(UALang);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user