summaryrefslogtreecommitdiff
path: root/netwerk/protocol
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-11-01 14:48:34 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-02 14:49:45 +0200
commit534de5cc5b76f3f8556b8a5c318cde7a5bb93c3d (patch)
tree1d0cebb83ce88607d10f7543e9defeeb715d1ccc /netwerk/protocol
parent023a71c6f2007eb08116ce539920f7cd11d52d8d (diff)
downloaduxp-534de5cc5b76f3f8556b8a5c318cde7a5bb93c3d.tar.gz
Issue #21 - Remove remaining telemetry structs, callers and flags.
Diffstat (limited to 'netwerk/protocol')
-rw-r--r--netwerk/protocol/http/AlternateServices.cpp7
-rw-r--r--netwerk/protocol/http/nsHttpChannel.cpp38
-rw-r--r--netwerk/protocol/http/nsHttpConnection.h2
-rw-r--r--netwerk/protocol/http/nsHttpConnectionMgr.cpp15
-rw-r--r--netwerk/protocol/http/nsHttpConnectionMgr.h11
-rw-r--r--netwerk/protocol/http/nsHttpHandler.cpp4
-rw-r--r--netwerk/protocol/websocket/WebSocketChannel.cpp31
-rw-r--r--netwerk/protocol/websocket/WebSocketChannel.h1
8 files changed, 5 insertions, 104 deletions
diff --git a/netwerk/protocol/http/AlternateServices.cpp b/netwerk/protocol/http/AlternateServices.cpp
index ee535f4a43..cbb28b58de 100644
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -1062,13 +1062,6 @@ AltSvcOverride::GetParallelSpeculativeConnectLimit(
}
NS_IMETHODIMP
-AltSvcOverride::GetIsFromPredictor(bool *isFromPredictor)
-{
- *isFromPredictor = false;
- return NS_OK;
-}
-
-NS_IMETHODIMP
AltSvcOverride::GetAllow1918(bool *allow)
{
// normally we don't do speculative connects to 1918.. and we use
diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
index 3a197efe4e..915a80fb68 100644
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set expandtab ts=4 sw=4 sts=4 cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -5829,8 +5828,6 @@ nsHttpChannel::HandleBeginConnectContinue()
nsresult
nsHttpChannel::BeginConnectContinue()
{
- nsresult rv;
-
// Check if request was cancelled during suspend AFTER on-modify-request or
// on-useragent.
if (mCanceled) {
@@ -6592,41 +6589,6 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
}
}
- // HTTP_CHANNEL_DISPOSITION TELEMETRY
- enum ChannelDisposition
- {
- kHttpCanceled = 0,
- kHttpDisk = 1,
- kHttpNetOK = 2,
- kHttpNetEarlyFail = 3,
- kHttpNetLateFail = 4,
- kHttpsCanceled = 8,
- kHttpsDisk = 9,
- kHttpsNetOK = 10,
- kHttpsNetEarlyFail = 11,
- kHttpsNetLateFail = 12
- } chanDisposition = kHttpCanceled;
-
- // HTTP 0.9 is more likely to be an error than really 0.9, so count it that way
- if (mCanceled) {
- chanDisposition = kHttpCanceled;
- } else if (!mUsedNetwork) {
- chanDisposition = kHttpDisk;
- } else if (NS_SUCCEEDED(status) &&
- mResponseHead &&
- mResponseHead->Version() != NS_HTTP_VERSION_0_9) {
- chanDisposition = kHttpNetOK;
- } else if (!mTransferSize) {
- chanDisposition = kHttpNetEarlyFail;
- } else {
- chanDisposition = kHttpNetLateFail;
- }
- if (IsHTTPS()) {
- // shift http to https disposition enums
- chanDisposition = static_cast<ChannelDisposition>(chanDisposition + kHttpsCanceled);
- }
- LOG((" nsHttpChannel::OnStopRequest ChannelDisposition %d\n", chanDisposition));
-
// if needed, check cache entry has all data we expect
if (mCacheEntry && mCachePump &&
mConcurrentCacheAccess && contentComplete) {
diff --git a/netwerk/protocol/http/nsHttpConnection.h b/netwerk/protocol/http/nsHttpConnection.h
index ce7523eb53..eeabe8eae3 100644
--- a/netwerk/protocol/http/nsHttpConnection.h
+++ b/netwerk/protocol/http/nsHttpConnection.h
@@ -378,7 +378,7 @@ private:
// for the end of
// the handsake.
int64_t mContentBytesWritten0RTT;
- bool mEarlyDataNegotiated; //Only used for telemetry
+ bool mEarlyDataNegotiated;
nsCString mEarlyNegotiatedALPN;
bool mDid0RTTSpdy;
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
index d402b41044..34bf9e58f3 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -1,4 +1,3 @@
-/* vim:set ts=4 sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -393,7 +392,6 @@ public: // intentional!
bool mOverridesOK;
uint32_t mParallelSpeculativeConnectLimit;
bool mIgnoreIdle;
- bool mIsFromPredictor;
bool mAllow1918;
private:
@@ -447,7 +445,6 @@ nsHttpConnectionMgr::SpeculativeConnect(nsHttpConnectionInfo *ci,
args->mParallelSpeculativeConnectLimit =
overrider->GetParallelSpeculativeConnectLimit();
args->mIgnoreIdle = overrider->GetIgnoreIdle();
- args->mIsFromPredictor = overrider->GetIsFromPredictor();
args->mAllow1918 = overrider->GetAllow1918();
}
@@ -1285,7 +1282,7 @@ nsHttpConnectionMgr::MakeNewConnection(nsConnectionEntry *ent,
if (AtActiveConnectionLimit(ent, trans->Caps()))
return NS_ERROR_NOT_AVAILABLE;
- nsresult rv = CreateTransport(ent, trans, trans->Caps(), false, false, true);
+ nsresult rv = CreateTransport(ent, trans, trans->Caps(), false, true);
if (NS_FAILED(rv)) {
/* hard failure */
LOG(("nsHttpConnectionMgr::MakeNewConnection [ci = %s trans = %p] "
@@ -1946,7 +1943,6 @@ nsHttpConnectionMgr::CreateTransport(nsConnectionEntry *ent,
nsAHttpTransaction *trans,
uint32_t caps,
bool speculative,
- bool isFromPredictor,
bool allow1918)
{
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
@@ -1955,10 +1951,6 @@ nsHttpConnectionMgr::CreateTransport(nsConnectionEntry *ent,
if (speculative) {
sock->SetSpeculative(true);
sock->SetAllow1918(allow1918);
-
- if (isFromPredictor) {
- sock->SetIsFromPredictor(true);
- }
}
// The socket stream holds the reference to the half open
@@ -2874,13 +2866,11 @@ nsHttpConnectionMgr::OnMsgSpeculativeConnect(int32_t, ARefBase *param)
uint32_t parallelSpeculativeConnectLimit =
gHttpHandler->ParallelSpeculativeConnectLimit();
bool ignoreIdle = false;
- bool isFromPredictor = false;
bool allow1918 = false;
if (args->mOverridesOK) {
parallelSpeculativeConnectLimit = args->mParallelSpeculativeConnectLimit;
ignoreIdle = args->mIgnoreIdle;
- isFromPredictor = args->mIsFromPredictor;
allow1918 = args->mAllow1918;
}
@@ -2890,7 +2880,7 @@ nsHttpConnectionMgr::OnMsgSpeculativeConnect(int32_t, ARefBase *param)
!ent->mIdleConns.Length()) &&
!(keepAlive && RestrictConnections(ent)) &&
!AtActiveConnectionLimit(ent, args->mTrans->Caps())) {
- CreateTransport(ent, args->mTrans, args->mTrans->Caps(), true, isFromPredictor, allow1918);
+ CreateTransport(ent, args->mTrans, args->mTrans->Caps(), true, allow1918);
} else {
LOG(("OnMsgSpeculativeConnect Transport "
"not created due to existing connection count\n"));
@@ -2939,7 +2929,6 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
, mDispatchedMTransaction(false)
, mCaps(caps)
, mSpeculative(false)
- , mIsFromPredictor(false)
, mAllow1918(true)
, mHasConnected(false)
, mPrimaryConnectedOK(false)
diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h
index a2c88c4028..b94761a018 100644
--- a/netwerk/protocol/http/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
@@ -1,4 +1,3 @@
-/* vim:set ts=4 sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -435,9 +434,6 @@ private:
bool IsSpeculative() { return mSpeculative; }
void SetSpeculative(bool val) { mSpeculative = val; }
- bool IsFromPredictor() { return mIsFromPredictor; }
- void SetIsFromPredictor(bool val) { mIsFromPredictor = val; }
-
bool Allow1918() { return mAllow1918; }
void SetAllow1918(bool val) { mAllow1918 = val; }
@@ -462,11 +458,6 @@ private:
// more connections that are needed.)
bool mSpeculative;
- // mIsFromPredictor is set if the socket originated from the network
- // Predictor. It is used to gather telemetry data on used speculative
- // connections from the predictor.
- bool mIsFromPredictor;
-
bool mAllow1918;
TimeStamp mPrimarySynStarted;
@@ -530,7 +521,7 @@ private:
nsresult EnsureSocketThreadTarget();
void ClosePersistentConnections(nsConnectionEntry *ent);
nsresult CreateTransport(nsConnectionEntry *, nsAHttpTransaction *,
- uint32_t, bool, bool, bool);
+ uint32_t, bool, bool);
void AddActiveConn(nsHttpConnection *, nsConnectionEntry *);
void DecrementActiveConnCount(nsHttpConnection *);
void StartedConnect();
diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
index 81b8a9f550..7b6dcc0216 100644
--- a/netwerk/protocol/http/nsHttpHandler.cpp
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
@@ -1,5 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* vim:set ts=4 sw=4 sts=4 et cin: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -1516,8 +1515,7 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
}
}
- // toggle to true anytime a token bucket related pref is changed.. that
- // includes telemetry and allow-experiments because of the abtest profile
+ // toggle to true anytime a token bucket related pref is changed.
bool requestTokenBucketUpdated = false;
// "security.ssl3.ecdhe_rsa_aes_128_gcm_sha256" is the required h2 interop
diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp
index 952c0d5ee5..85a822806b 100644
--- a/netwerk/protocol/websocket/WebSocketChannel.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannel.cpp
@@ -2962,35 +2962,6 @@ WebSocketChannel::StartPinging()
}
-void
-WebSocketChannel::ReportConnectionTelemetry()
-{
- // 3 bits are used. high bit is for wss, middle bit for failed,
- // and low bit for proxy..
- // 0 - 7 : ws-ok-plain, ws-ok-proxy, ws-failed-plain, ws-failed-proxy,
- // wss-ok-plain, wss-ok-proxy, wss-failed-plain, wss-failed-proxy
-
- bool didProxy = false;
-
- nsCOMPtr<nsIProxyInfo> pi;
- nsCOMPtr<nsIProxiedChannel> pc = do_QueryInterface(mChannel);
- if (pc)
- pc->GetProxyInfo(getter_AddRefs(pi));
- if (pi) {
- nsAutoCString proxyType;
- pi->GetType(proxyType);
- if (!proxyType.IsEmpty() &&
- !proxyType.EqualsLiteral("direct"))
- didProxy = true;
- }
-
- uint8_t value = (mEncrypted ? (1 << 2) : 0) |
- (!mGotUpgradeOK ? (1 << 1) : 0) |
- (didProxy ? (1 << 0) : 0);
-
- LOG(("WebSocketChannel::ReportConnectionTelemetry() %p %d", this, value));
-}
-
// nsIDNSListener
NS_IMETHODIMP
@@ -3873,8 +3844,6 @@ WebSocketChannel::OnStopRequest(nsIRequest *aRequest,
this, aRequest, mHttpChannel.get(), aStatusCode));
MOZ_ASSERT(NS_IsMainThread(), "not main thread");
- ReportConnectionTelemetry();
-
// This is the end of the HTTP upgrade transaction, the
// upgraded streams live on
diff --git a/netwerk/protocol/websocket/WebSocketChannel.h b/netwerk/protocol/websocket/WebSocketChannel.h
index f60bc4fbbe..b496bbc0a0 100644
--- a/netwerk/protocol/websocket/WebSocketChannel.h
+++ b/netwerk/protocol/websocket/WebSocketChannel.h
@@ -158,7 +158,6 @@ private:
nsresult DoAdmissionDNS();
nsresult StartWebsocketData();
uint16_t ResultToCloseCode(nsresult resultCode);
- void ReportConnectionTelemetry();
void StopSession(nsresult reason);
void AbortSession(nsresult reason);