зеркало из https://github.com/mozilla/gecko-dev.git
Bug 646428 - Remove nsIHttpProtocolHandler's language attribute. r=bz
This commit is contained in:
Родитель
c79624e062
Коммит
0727bc7c1c
|
@ -289,7 +289,6 @@ nsHttpHandler::Init()
|
|||
LOG(("> legacy-app-version = %s\n", mLegacyAppVersion.get()));
|
||||
LOG(("> platform = %s\n", mPlatform.get()));
|
||||
LOG(("> oscpu = %s\n", mOscpu.get()));
|
||||
LOG(("> language = %s\n", mLanguage.get()));
|
||||
LOG(("> misc = %s\n", mMisc.get()));
|
||||
LOG(("> product = %s\n", mProduct.get()));
|
||||
LOG(("> product-sub = %s\n", mProductSub.get()));
|
||||
|
@ -815,28 +814,6 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
|||
mUserAgentIsDirty = PR_TRUE;
|
||||
}
|
||||
|
||||
// Gather locale.
|
||||
if (PREF_CHANGED(UA_PREF("locale"))) {
|
||||
nsCOMPtr<nsIPrefLocalizedString> pls;
|
||||
prefs->GetComplexValue(UA_PREF("locale"),
|
||||
NS_GET_IID(nsIPrefLocalizedString),
|
||||
getter_AddRefs(pls));
|
||||
if (pls) {
|
||||
nsXPIDLString uval;
|
||||
pls->ToString(getter_Copies(uval));
|
||||
if (uval)
|
||||
CopyUTF16toUTF8(uval, mLanguage);
|
||||
}
|
||||
else {
|
||||
nsXPIDLCString cval;
|
||||
rv = prefs->GetCharPref(UA_PREF("locale"), getter_Copies(cval));
|
||||
if (cval)
|
||||
mLanguage.Assign(cval);
|
||||
}
|
||||
|
||||
mUserAgentIsDirty = PR_TRUE;
|
||||
}
|
||||
|
||||
// general.useragent.override
|
||||
if (PREF_CHANGED(UA_PREF("override"))) {
|
||||
prefs->GetCharPref(UA_PREF("override"),
|
||||
|
@ -1580,13 +1557,6 @@ nsHttpHandler::GetOscpu(nsACString &value)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::GetLanguage(nsACString &value)
|
||||
{
|
||||
value = mLanguage;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::GetMisc(nsACString &value)
|
||||
{
|
||||
|
|
|
@ -307,7 +307,6 @@ private:
|
|||
nsCString mLegacyAppVersion;
|
||||
nsCString mPlatform;
|
||||
nsCString mOscpu;
|
||||
nsCString mLanguage;
|
||||
nsCString mMisc;
|
||||
nsCString mProduct;
|
||||
nsXPIDLCString mProductSub;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "nsIProxiedProtocolHandler.idl"
|
||||
|
||||
[scriptable, uuid(7516a8d3-0a6f-4476-88f5-fb9973450c5f)]
|
||||
[scriptable, uuid(9814fdf0-5ac3-11e0-80e3-0800200c9a66)]
|
||||
interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
|
||||
{
|
||||
/**
|
||||
|
@ -86,13 +86,6 @@ interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
|
|||
*/
|
||||
readonly attribute ACString oscpu;
|
||||
|
||||
/**
|
||||
* Get the translation of the application. The value for language
|
||||
* is usually a 2-letter code such as "en" and occasionally a
|
||||
* five-character code to indicate a language subtype, such as "zh_CN".
|
||||
*/
|
||||
readonly attribute ACString language;
|
||||
|
||||
/**
|
||||
* Get the application comment misc portion.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче