mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
bug 1483311 - add LOAD_DISABLE_TRR as a loadflag r=mcmanus
Disable TRR at will without needing to toggle the pref. MozReview-Commit-ID: 1Ept6kDrjN3 Differential Revision: https://phabricator.services.mozilla.com/D3399 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
73411195a3
commit
8225a95bbd
@ -137,6 +137,12 @@ interface nsIRequest : nsISupports
|
|||||||
*/
|
*/
|
||||||
const unsigned long LOAD_DOCUMENT_NEEDS_COOKIE = 1 << 2;
|
const unsigned long LOAD_DOCUMENT_NEEDS_COOKIE = 1 << 2;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this flag to disable TRR for this request.
|
||||||
|
*/
|
||||||
|
const unsigned long LOAD_DISABLE_TRR = 1 << 3;
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* The following flags control the flow of data into the cache.
|
* The following flags control the flow of data into the cache.
|
||||||
*/
|
*/
|
||||||
|
@ -565,6 +565,10 @@ nsHttpChannel::OnBeforeConnect()
|
|||||||
mCaps |= NS_HTTP_LARGE_KEEPALIVE | NS_HTTP_DISABLE_TRR;
|
mCaps |= NS_HTTP_LARGE_KEEPALIVE | NS_HTTP_DISABLE_TRR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mLoadFlags & LOAD_DISABLE_TRR) {
|
||||||
|
mCaps |= NS_HTTP_DISABLE_TRR;
|
||||||
|
}
|
||||||
|
|
||||||
// Finalize ConnectionInfo flags before SpeculativeConnect
|
// Finalize ConnectionInfo flags before SpeculativeConnect
|
||||||
mConnectionInfo->SetAnonymous((mLoadFlags & LOAD_ANONYMOUS) != 0);
|
mConnectionInfo->SetAnonymous((mLoadFlags & LOAD_ANONYMOUS) != 0);
|
||||||
mConnectionInfo->SetPrivate(mPrivateBrowsing);
|
mConnectionInfo->SetPrivate(mPrivateBrowsing);
|
||||||
|
Loading…
Reference in New Issue
Block a user