mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 591573 - remove support for general.useragent.vendor & vendorSub. r=dwitte sr=dveditz a=jst
This commit is contained in:
parent
3b1cbfe94c
commit
18d8144ca5
@ -10335,32 +10335,16 @@ nsNavigator::GetOscpu(nsAString& aOSCPU)
|
||||
NS_IMETHODIMP
|
||||
nsNavigator::GetVendor(nsAString& aVendor)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIHttpProtocolHandler>
|
||||
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCAutoString vendor;
|
||||
rv = service->GetVendor(vendor);
|
||||
CopyASCIItoUTF16(vendor, aVendor);
|
||||
}
|
||||
|
||||
return rv;
|
||||
aVendor.Truncate();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNavigator::GetVendorSub(nsAString& aVendorSub)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIHttpProtocolHandler>
|
||||
service(do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &rv));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsCAutoString vendor;
|
||||
rv = service->GetVendorSub(vendor);
|
||||
CopyASCIItoUTF16(vendor, aVendorSub);
|
||||
}
|
||||
|
||||
return rv;
|
||||
aVendorSub.Truncate();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -293,8 +293,6 @@ nsHttpHandler::Init()
|
||||
LOG(("> oscpu = %s\n", mOscpu.get()));
|
||||
LOG(("> language = %s\n", mLanguage.get()));
|
||||
LOG(("> misc = %s\n", mMisc.get()));
|
||||
LOG(("> vendor = %s\n", mVendor.get()));
|
||||
LOG(("> vendor-sub = %s\n", mVendorSub.get()));
|
||||
LOG(("> product = %s\n", mProduct.get()));
|
||||
LOG(("> product-sub = %s\n", mProductSub.get()));
|
||||
LOG(("> app-name = %s\n", mAppName.get()));
|
||||
@ -603,12 +601,10 @@ nsHttpHandler::BuildUserAgent()
|
||||
mMisc.Length() +
|
||||
mProduct.Length() +
|
||||
mProductSub.Length() +
|
||||
mVendor.Length() +
|
||||
mVendorSub.Length() +
|
||||
mAppName.Length() +
|
||||
mAppVersion.Length() +
|
||||
mCompatFirefox.Length() +
|
||||
15);
|
||||
13);
|
||||
|
||||
// Application portion
|
||||
mUserAgent.Assign(mLegacyAppName);
|
||||
@ -644,16 +640,6 @@ nsHttpHandler::BuildUserAgent()
|
||||
mUserAgent += mAppName;
|
||||
mUserAgent += '/';
|
||||
mUserAgent += mAppVersion;
|
||||
|
||||
// Vendor portion
|
||||
if (!mVendor.IsEmpty()) {
|
||||
mUserAgent += ' ';
|
||||
mUserAgent += mVendor;
|
||||
if (!mVendorSub.IsEmpty()) {
|
||||
mUserAgent += '/';
|
||||
mUserAgent += mVendorSub;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
@ -798,18 +784,6 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
||||
// UA components
|
||||
//
|
||||
|
||||
// Gather vendor values.
|
||||
if (PREF_CHANGED(UA_PREF("vendor"))) {
|
||||
prefs->GetCharPref(UA_PREF("vendor"),
|
||||
getter_Copies(mVendor));
|
||||
mUserAgentIsDirty = PR_TRUE;
|
||||
}
|
||||
if (PREF_CHANGED(UA_PREF("vendorSub"))) {
|
||||
prefs->GetCharPref(UA_PREF("vendorSub"),
|
||||
getter_Copies(mVendorSub));
|
||||
mUserAgentIsDirty = PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool cVar = PR_FALSE;
|
||||
|
||||
if (PREF_CHANGED(UA_PREF("compatMode.firefox"))) {
|
||||
@ -1546,20 +1520,6 @@ nsHttpHandler::GetAppVersion(nsACString &value)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::GetVendor(nsACString &value)
|
||||
{
|
||||
value = mVendor;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::GetVendorSub(nsACString &value)
|
||||
{
|
||||
value = mVendorSub;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHttpHandler::GetProduct(nsACString &value)
|
||||
{
|
||||
|
@ -306,8 +306,6 @@ private:
|
||||
nsCString mOscpu;
|
||||
nsCString mLanguage;
|
||||
nsCString mMisc;
|
||||
nsXPIDLCString mVendor;
|
||||
nsXPIDLCString mVendorSub;
|
||||
nsCString mProduct;
|
||||
nsXPIDLCString mProductSub;
|
||||
nsXPIDLCString mAppName;
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "nsIProxiedProtocolHandler.idl"
|
||||
|
||||
[scriptable, uuid(36709064-d2c8-40cb-b754-d30d970be639)]
|
||||
[scriptable, uuid(7516a8d3-0a6f-4476-88f5-fb9973450c5f)]
|
||||
interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
|
||||
{
|
||||
/**
|
||||
@ -61,16 +61,6 @@ interface nsIHttpProtocolHandler : nsIProxiedProtocolHandler
|
||||
*/
|
||||
readonly attribute ACString appVersion;
|
||||
|
||||
/**
|
||||
* @return The vendor name.
|
||||
*/
|
||||
readonly attribute ACString vendor;
|
||||
|
||||
/**
|
||||
* @return The vendor sub string.
|
||||
*/
|
||||
readonly attribute ACString vendorSub;
|
||||
|
||||
/**
|
||||
* @return The product name.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user