diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-15 16:24:47 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-15 16:24:47 +0000 |
commit | 18df01eb5498c954044f96c346026da0238d2e61 (patch) | |
tree | 17d1a6588dea79f43769a66cb482697aa955638b /netwerk | |
parent | 8aa9355535820bb4b3d47d52b8ece367724d9faa (diff) | |
download | UXP-18df01eb5498c954044f96c346026da0238d2e61.tar UXP-18df01eb5498c954044f96c346026da0238d2e61.tar.gz UXP-18df01eb5498c954044f96c346026da0238d2e61.tar.lz UXP-18df01eb5498c954044f96c346026da0238d2e61.tar.xz UXP-18df01eb5498c954044f96c346026da0238d2e61.zip |
Issue #1684 - Remove global UA override preference and supporting code.
Resolves #1684
Diffstat (limited to 'netwerk')
-rw-r--r-- | netwerk/base/RequestContextService.cpp | 16 | ||||
-rw-r--r-- | netwerk/base/nsIRequestContext.idl | 6 | ||||
-rw-r--r-- | netwerk/protocol/http/nsHttpHandler.cpp | 12 | ||||
-rw-r--r-- | netwerk/protocol/http/nsHttpHandler.h | 1 |
4 files changed, 1 insertions, 34 deletions
diff --git a/netwerk/base/RequestContextService.cpp b/netwerk/base/RequestContextService.cpp index 7edda1845..362c9ea47 100644 --- a/netwerk/base/RequestContextService.cpp +++ b/netwerk/base/RequestContextService.cpp @@ -33,7 +33,6 @@ private: char mCID[NSID_LENGTH]; Atomic<uint32_t> mBlockingTransactionCount; nsAutoPtr<SpdyPushCache> mSpdyCache; - nsCString mUserAgentOverride; }; NS_IMPL_ISUPPORTS(RequestContext, nsIRequestContext) @@ -95,21 +94,6 @@ RequestContext::GetID(nsID *outval) return NS_OK; } -NS_IMETHODIMP -RequestContext::GetUserAgentOverride(nsACString& aUserAgentOverride) -{ - aUserAgentOverride = mUserAgentOverride; - return NS_OK; -} - -NS_IMETHODIMP -RequestContext::SetUserAgentOverride(const nsACString& aUserAgentOverride) -{ - mUserAgentOverride = aUserAgentOverride; - return NS_OK; -} - - //nsIRequestContextService RequestContextService *RequestContextService::sSelf = nullptr; diff --git a/netwerk/base/nsIRequestContext.idl b/netwerk/base/nsIRequestContext.idl index b40ba7d18..a58275216 100644 --- a/netwerk/base/nsIRequestContext.idl +++ b/netwerk/base/nsIRequestContext.idl @@ -24,7 +24,7 @@ class SpdyPushCache; * * This used to be known as nsILoadGroupConnectionInfo and nsISchedulingContext. */ -[scriptable, uuid(658e3e6e-8633-4b1a-8d66-fa9f72293e63)] +[scriptable, uuid(a1b5c243-ab9b-41a7-a208-f8a9c0c43dc2)] interface nsIRequestContext : nsISupports { /** @@ -58,10 +58,6 @@ interface nsIRequestContext : nsISupports */ [noscript] attribute SpdyPushCachePtr spdyPushCache; - /** - * This holds a cached value of the user agent override. - */ - [noscript] attribute ACString userAgentOverride; }; /** diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 7a29e041b..0ae589151 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -685,11 +685,6 @@ nsHttpHandler::BuildAppVersion() const nsAFlatCString & nsHttpHandler::UserAgent() { - if (mUserAgentOverride) { - LOG(("using general.useragent.override : %s\n", mUserAgentOverride.get())); - return mUserAgentOverride; - } - if (mUserAgentIsDirty) { BuildUserAgent(); mUserAgentIsDirty = false; @@ -991,13 +986,6 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) mUserAgentIsDirty = true; } - // general.useragent.override - if (PREF_CHANGED(UA_PREF("override"))) { - prefs->GetCharPref(UA_PREF("override"), - getter_Copies(mUserAgentOverride)); - mUserAgentIsDirty = true; - } - // // HTTP options // diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h index 4f632e078..549b82205 100644 --- a/netwerk/protocol/http/nsHttpHandler.h +++ b/netwerk/protocol/http/nsHttpHandler.h @@ -506,7 +506,6 @@ private: nsCString mDeviceModelId; nsCString mUserAgent; - nsXPIDLCString mUserAgentOverride; bool mUserAgentIsDirty; // true if mUserAgent should be rebuilt bool mAcceptLanguagesIsDirty; |