зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1525640 - Rename nsIHttpChannelInternal.trr to .isHttpServiceChannel to avoid confusion r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D26883 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f172b45edc
Коммит
e6696588e7
|
@ -275,7 +275,7 @@ nsresult TRR::SendHTTPRequest() {
|
|||
// update with each HEADERS or reply to a DATA with a WINDOW UPDATE
|
||||
rv = internalChannel->SetInitialRwin(127 * 1024);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = internalChannel->SetTrr(true);
|
||||
rv = internalChannel->SetIsTRRServiceChannel(true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mAllowRFC1918 = gTRRService->AllowRFC1918();
|
||||
|
|
|
@ -476,10 +476,14 @@ ClassifierDummyChannel::SetBeConservative(bool aBeConservative) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ClassifierDummyChannel::GetTrr(bool* aTrr) { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
ClassifierDummyChannel::GetIsTRRServiceChannel(bool* aTrr) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ClassifierDummyChannel::SetTrr(bool aTrr) { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
ClassifierDummyChannel::SetIsTRRServiceChannel(bool aTrr) {
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ClassifierDummyChannel::GetTlsFlags(uint32_t* aTlsFlags) {
|
||||
|
|
|
@ -416,7 +416,7 @@ uint32_t Http2Session::RegisterStreamID(Http2Stream *stream, uint32_t aNewID) {
|
|||
// don't count push streams here
|
||||
MOZ_ASSERT(stream->Transaction(), "no transation for the stream!");
|
||||
RefPtr<nsHttpConnectionInfo> ci(stream->Transaction()->ConnectionInfo());
|
||||
if (ci && ci->GetTrrUsed()) {
|
||||
if (ci && ci->GetIsTrrServiceChannel()) {
|
||||
IncrementTrrCounter();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -496,7 +496,7 @@ nsresult Http2Stream::ParseHttpRequestHeaders(const char *buf, uint32_t avail,
|
|||
|
||||
// if the "mother stream" had TRR, this one is a TRR stream too!
|
||||
RefPtr<nsHttpConnectionInfo> ci(Transaction()->ConnectionInfo());
|
||||
if (ci && ci->GetTrrUsed()) {
|
||||
if (ci && ci->GetIsTrrServiceChannel()) {
|
||||
mSession->IncrementTrrCounter();
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ HttpBaseChannel::HttpBaseChannel()
|
|||
mAllowSpdy(true),
|
||||
mAllowAltSvc(true),
|
||||
mBeConservative(false),
|
||||
mTRR(false),
|
||||
mIsTRRServiceChannel(false),
|
||||
mResponseTimeoutEnabled(true),
|
||||
mAllRedirectsSameOrigin(true),
|
||||
mAllRedirectsPassTimingAllowCheck(true),
|
||||
|
@ -2701,16 +2701,16 @@ HttpBaseChannel::SetBeConservative(bool aBeConservative) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::GetTrr(bool* aTRR) {
|
||||
NS_ENSURE_ARG_POINTER(aTRR);
|
||||
HttpBaseChannel::GetIsTRRServiceChannel(bool* aIsTRRServiceChannel) {
|
||||
NS_ENSURE_ARG_POINTER(aIsTRRServiceChannel);
|
||||
|
||||
*aTRR = mTRR;
|
||||
*aIsTRRServiceChannel = mIsTRRServiceChannel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::SetTrr(bool aTRR) {
|
||||
mTRR = aTRR;
|
||||
HttpBaseChannel::SetIsTRRServiceChannel(bool aIsTRRServiceChannel) {
|
||||
mIsTRRServiceChannel = aIsTRRServiceChannel;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -3577,7 +3577,7 @@ nsresult HttpBaseChannel::SetupReplacementChannel(nsIURI* newURI,
|
|||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
rv = httpInternal->SetBeConservative(mBeConservative);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
rv = httpInternal->SetTrr(mTRR);
|
||||
rv = httpInternal->SetIsTRRServiceChannel(mIsTRRServiceChannel);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
rv = httpInternal->SetTlsFlags(mTlsFlags);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
|
|
|
@ -276,8 +276,8 @@ class HttpBaseChannel : public nsHashPropertyBag,
|
|||
NS_IMETHOD SetAllowAltSvc(bool aAllowAltSvc) override;
|
||||
NS_IMETHOD GetBeConservative(bool *aBeConservative) override;
|
||||
NS_IMETHOD SetBeConservative(bool aBeConservative) override;
|
||||
NS_IMETHOD GetTrr(bool *aTRR) override;
|
||||
NS_IMETHOD SetTrr(bool aTRR) override;
|
||||
NS_IMETHOD GetIsTRRServiceChannel(bool *aTRR) override;
|
||||
NS_IMETHOD SetIsTRRServiceChannel(bool aTRR) override;
|
||||
NS_IMETHOD GetTlsFlags(uint32_t *aTlsFlags) override;
|
||||
NS_IMETHOD SetTlsFlags(uint32_t aTlsFlags) override;
|
||||
NS_IMETHOD GetApiRedirectToURI(nsIURI **aApiRedirectToURI) override;
|
||||
|
@ -701,7 +701,7 @@ class HttpBaseChannel : public nsHashPropertyBag,
|
|||
// classification. If this is changed or removed, make sure we also update
|
||||
// NS_ShouldClassifyChannel accordingly !!!
|
||||
uint32_t mBeConservative : 1;
|
||||
uint32_t mTRR : 1;
|
||||
uint32_t mIsTRRServiceChannel : 1;
|
||||
uint32_t mResponseTimeoutEnabled : 1;
|
||||
// A flag that should be false only if a cross-domain redirect occurred
|
||||
uint32_t mAllRedirectsSameOrigin : 1;
|
||||
|
|
|
@ -617,7 +617,7 @@ nsresult nsHttpChannel::ContinueOnBeforeConnect(bool aShouldUpgrade,
|
|||
}
|
||||
}
|
||||
|
||||
if (mTRR) {
|
||||
if (mIsTRRServiceChannel) {
|
||||
mCaps |= NS_HTTP_LARGE_KEEPALIVE | NS_HTTP_DISABLE_TRR;
|
||||
}
|
||||
|
||||
|
@ -632,7 +632,7 @@ nsresult nsHttpChannel::ContinueOnBeforeConnect(bool aShouldUpgrade,
|
|||
mConnectionInfo->SetBeConservative((mCaps & NS_HTTP_BE_CONSERVATIVE) ||
|
||||
mBeConservative);
|
||||
mConnectionInfo->SetTlsFlags(mTlsFlags);
|
||||
mConnectionInfo->SetTrrUsed(mTRR);
|
||||
mConnectionInfo->SetIsTrrServiceChannel(mIsTRRServiceChannel);
|
||||
mConnectionInfo->SetTrrDisabled(mCaps & NS_HTTP_DISABLE_TRR);
|
||||
mConnectionInfo->SetIPv4Disabled(mCaps & NS_HTTP_DISABLE_IPV4);
|
||||
mConnectionInfo->SetIPv6Disabled(mCaps & NS_HTTP_DISABLE_IPV6);
|
||||
|
@ -4037,7 +4037,7 @@ nsresult nsHttpChannel::OpenCacheEntryInternal(
|
|||
if (mPostID) {
|
||||
extension.Append(nsPrintfCString("%d", mPostID));
|
||||
}
|
||||
if (mTRR) {
|
||||
if (mIsTRRServiceChannel) {
|
||||
extension.Append("TRR");
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ nsHttpConnection::~nsHttpConnection() {
|
|||
}
|
||||
|
||||
MOZ_ASSERT(ci);
|
||||
if (ci->GetTrrUsed()) {
|
||||
if (ci->GetIsTrrServiceChannel()) {
|
||||
Telemetry::Accumulate(Telemetry::DNS_TRR_REQUEST_PER_CONN,
|
||||
mHttp1xTransactionCount);
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ void nsHttpConnectionInfo::Init(const nsACString &host, int32_t port,
|
|||
mNPNToken = npnToken;
|
||||
mOriginAttributes = originAttributes;
|
||||
mTlsFlags = 0x0;
|
||||
mTrrUsed = false;
|
||||
mIsTrrServiceChannel = false;
|
||||
mTrrDisabled = false;
|
||||
mIPv4Disabled = false;
|
||||
mIPv6Disabled = false;
|
||||
|
@ -250,7 +250,7 @@ already_AddRefed<nsHttpConnectionInfo> nsHttpConnectionInfo::Clone() const {
|
|||
clone->SetNoSpdy(GetNoSpdy());
|
||||
clone->SetBeConservative(GetBeConservative());
|
||||
clone->SetTlsFlags(GetTlsFlags());
|
||||
clone->SetTrrUsed(GetTrrUsed());
|
||||
clone->SetIsTrrServiceChannel(GetIsTrrServiceChannel());
|
||||
clone->SetTrrDisabled(GetTrrDisabled());
|
||||
clone->SetIPv4Disabled(GetIPv4Disabled());
|
||||
clone->SetIPv6Disabled(GetIPv6Disabled());
|
||||
|
@ -276,7 +276,7 @@ void nsHttpConnectionInfo::CloneAsDirectRoute(nsHttpConnectionInfo **outCI) {
|
|||
clone->SetNoSpdy(GetNoSpdy());
|
||||
clone->SetBeConservative(GetBeConservative());
|
||||
clone->SetTlsFlags(GetTlsFlags());
|
||||
clone->SetTrrUsed(GetTrrUsed());
|
||||
clone->SetIsTrrServiceChannel(GetIsTrrServiceChannel());
|
||||
clone->SetTrrDisabled(GetTrrDisabled());
|
||||
clone->SetIPv4Disabled(GetIPv4Disabled());
|
||||
clone->SetIPv6Disabled(GetIPv6Disabled());
|
||||
|
|
|
@ -125,9 +125,12 @@ class nsHttpConnectionInfo final : public ARefBase {
|
|||
void SetTlsFlags(uint32_t aTlsFlags);
|
||||
uint32_t GetTlsFlags() const { return mTlsFlags; }
|
||||
|
||||
// TrrUsed means that this connection is used to send TRR requests over
|
||||
void SetTrrUsed(bool aUsed) { mTrrUsed = aUsed; }
|
||||
bool GetTrrUsed() const { return mTrrUsed; }
|
||||
// IsTrrServiceChannel means that this connection is used to send TRR requests
|
||||
// over
|
||||
void SetIsTrrServiceChannel(bool aIsTRRChannel) {
|
||||
mIsTrrServiceChannel = aIsTRRChannel;
|
||||
}
|
||||
bool GetIsTrrServiceChannel() const { return mIsTrrServiceChannel; }
|
||||
|
||||
// SetTrrDisabled means don't use TRR to resolve host names for this
|
||||
// connection
|
||||
|
@ -195,7 +198,7 @@ class nsHttpConnectionInfo final : public ARefBase {
|
|||
OriginAttributes mOriginAttributes;
|
||||
|
||||
uint32_t mTlsFlags;
|
||||
uint16_t mTrrUsed : 1;
|
||||
uint16_t mIsTrrServiceChannel : 1;
|
||||
uint16_t mTrrDisabled : 1;
|
||||
uint16_t mIPv4Disabled : 1;
|
||||
uint16_t mIPv6Disabled : 1;
|
||||
|
|
|
@ -243,7 +243,7 @@ interface nsIHttpChannelInternal : nsISupports
|
|||
* True if channel is used by the internal trusted recursive resolver
|
||||
* This flag places data for the request in a cache segment specific to TRR
|
||||
*/
|
||||
[noscript, must_use] attribute boolean trr;
|
||||
[noscript, must_use] attribute boolean isTRRServiceChannel;
|
||||
|
||||
/**
|
||||
* An opaque flags for non-standard behavior of the TLS system.
|
||||
|
|
Загрузка…
Ссылка в новой задаче