Bug 572656 - Remove the UI language from the UA string and navigator.appVersion. r=bz

This commit is contained in:
Dão Gottwald 2010-07-19 22:18:11 +02:00
Родитель 2f4426c2f1
Коммит 03a6a23a43
3 изменённых файлов: 2 добавлений и 21 удалений

Просмотреть файл

@ -9823,13 +9823,6 @@ nsNavigator::GetAppVersion(nsAString& aAppVersion)
AppendASCIItoUTF16(str, aAppVersion);
aAppVersion.AppendLiteral("; ");
rv = service->GetLanguage(str);
if (NS_FAILED(rv))
return rv;
AppendASCIItoUTF16(str, aAppVersion);
aAppVersion.Append(PRUnichar(')'));
}

Просмотреть файл

@ -613,7 +613,6 @@ nsHttpHandler::BuildUserAgent()
mPlatform.Length() +
mOscpu.Length() +
mDeviceType.Length() +
mLanguage.Length() +
mMisc.Length() +
mProduct.Length() +
mProductSub.Length() +
@ -635,10 +634,6 @@ nsHttpHandler::BuildUserAgent()
mUserAgent += mPlatform;
mUserAgent.AppendLiteral("; ");
mUserAgent += mOscpu;
if (!mLanguage.IsEmpty()) {
mUserAgent.AppendLiteral("; ");
mUserAgent += mLanguage;
}
if (!mMisc.IsEmpty()) {
mUserAgent.AppendLiteral("; ");
mUserAgent += mMisc;
@ -1735,13 +1730,6 @@ nsHttpHandler::GetLanguage(nsACString &value)
value = mLanguage;
return NS_OK;
}
NS_IMETHODIMP
nsHttpHandler::SetLanguage(const nsACString &value)
{
mLanguage = value;
mUserAgentIsDirty = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
nsHttpHandler::GetMisc(nsACString &value)

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsIProxiedProtocolHandler.idl"
[scriptable, uuid(415D4087-79D3-40FE-B194-0ADA8471F895)]
[scriptable, uuid(a2479d10-9277-11df-981c-0800200c9a66)]
interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
{
/**
@ -111,7 +111,7 @@ interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
* is usually a 2-letter code such as "en" and occasionally a
* five-character code to indicate a language subtype, such as "zh_CN".
*/
attribute ACString language;
readonly attribute ACString language;
/**
* Get/Set the application comment misc portion.