summaryrefslogtreecommitdiff
path: root/netwerk
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
parent023a71c6f2007eb08116ce539920f7cd11d52d8d (diff)
downloaduxp-534de5cc5b76f3f8556b8a5c318cde7a5bb93c3d.tar.gz
Issue #21 - Remove remaining telemetry structs, callers and flags.
Diffstat (limited to 'netwerk')
-rw-r--r--netwerk/base/Predictor.cpp7
-rw-r--r--netwerk/base/nsIAuthModule.idl15
-rw-r--r--netwerk/base/nsIBrowserSearchService.idl3
-rw-r--r--netwerk/base/nsISpeculativeConnect.idl6
-rw-r--r--netwerk/base/security-prefs.js2
-rw-r--r--netwerk/cache/nsDiskCache.h2
-rw-r--r--netwerk/cache2/CacheFileMetadata.cpp2
-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
15 files changed, 8 insertions, 138 deletions
diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp
index 1b2020f5db..311832c955 100644
--- a/netwerk/base/Predictor.cpp
+++ b/netwerk/base/Predictor.cpp
@@ -493,13 +493,6 @@ Predictor::GetParallelSpeculativeConnectLimit(
}
NS_IMETHODIMP
-Predictor::GetIsFromPredictor(bool *isFromPredictor)
-{
- *isFromPredictor = true;
- return NS_OK;
-}
-
-NS_IMETHODIMP
Predictor::GetAllow1918(bool *allow1918)
{
*allow1918 = false;
diff --git a/netwerk/base/nsIAuthModule.idl b/netwerk/base/nsIAuthModule.idl
index 8a446cb219..503923f2b1 100644
--- a/netwerk/base/nsIAuthModule.idl
+++ b/netwerk/base/nsIAuthModule.idl
@@ -1,4 +1,3 @@
-/* vim:set ts=4 sw=4 et cindent: */
/* 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/. */
@@ -30,20 +29,6 @@ interface nsIAuthModule : nsISupports
const unsigned long REQ_PROXY_AUTH = (1 << 2);
/**
- * Flags used for telemetry.
- */
- const unsigned long NTLM_MODULE_SAMBA_AUTH_PROXY = 0;
- const unsigned long NTLM_MODULE_SAMBA_AUTH_DIRECT = 1;
- const unsigned long NTLM_MODULE_WIN_API_PROXY = 2;
- const unsigned long NTLM_MODULE_WIN_API_DIRECT = 3;
- const unsigned long NTLM_MODULE_GENERIC_PROXY = 4;
- const unsigned long NTLM_MODULE_GENERIC_DIRECT = 5;
- const unsigned long NTLM_MODULE_KERBEROS_PROXY = 6;
- const unsigned long NTLM_MODULE_KERBEROS_DIRECT = 7;
-
- /** Other flags may be defined in the future */
-
- /**
* Called to initialize an auth module. The other methods cannot be called
* unless this method succeeds.
*
diff --git a/netwerk/base/nsIBrowserSearchService.idl b/netwerk/base/nsIBrowserSearchService.idl
index 4ca052e916..cc94c5a7ed 100644
--- a/netwerk/base/nsIBrowserSearchService.idl
+++ b/netwerk/base/nsIBrowserSearchService.idl
@@ -464,8 +464,7 @@ interface nsIBrowserSearchService : nsISupports
attribute nsISearchEngine currentEngine;
/**
- * Gets a representation of the default engine in an anonymized JSON
- * string suitable for recording in the Telemetry environment.
+ * Gets a representation of the default engine.
*
* @return an object containing anonymized info about the default engine:
* name, loadPath, submissionURL (for default engines).
diff --git a/netwerk/base/nsISpeculativeConnect.idl b/netwerk/base/nsISpeculativeConnect.idl
index 067edd3f08..fbee7aeecf 100644
--- a/netwerk/base/nsISpeculativeConnect.idl
+++ b/netwerk/base/nsISpeculativeConnect.idl
@@ -64,12 +64,6 @@ interface nsISpeculativeConnectionOverrider : nsISupports
*/
[infallible] readonly attribute boolean ignoreIdle;
- /*
- * Used by the Predictor to gather telemetry data on speculative connection
- * usage.
- */
- [infallible] readonly attribute boolean isFromPredictor;
-
/**
* by default speculative connections are not made to RFC 1918 addresses
*/
diff --git a/netwerk/base/security-prefs.js b/netwerk/base/security-prefs.js
index 745f1072c8..9d89979470 100644
--- a/netwerk/base/security-prefs.js
+++ b/netwerk/base/security-prefs.js
@@ -75,7 +75,7 @@ pref("security.OCSP.require", false);
pref("security.OCSP.GET.enabled", false);
pref("security.pki.cert_short_lifetime_in_days", 10);
-// NB: Changes to this pref affect CERT_CHAIN_SHA1_POLICY_STATUS telemetry.
+// NB: Changes to this pref affect CERT_CHAIN_SHA1_POLICY_STATUS.
// See the comment in CertVerifier.cpp.
// 3 = only allow SHA-1 for certificates issued by an imported root.
pref("security.pki.sha1_enforcement_level", 3);
diff --git a/netwerk/cache/nsDiskCache.h b/netwerk/cache/nsDiskCache.h
index cc91553fa8..efb12b7245 100644
--- a/netwerk/cache/nsDiskCache.h
+++ b/netwerk/cache/nsDiskCache.h
@@ -24,8 +24,6 @@ public:
enum { kData, kMetaData };
// Stores the reason why the cache is corrupt.
- // Note: I'm only listing the enum values explicitly for easy mapping when
- // looking at telemetry data.
enum CorruptCacheInfo {
kNotCorrupt = 0,
kInvalidArgPointer = 1,
diff --git a/netwerk/cache2/CacheFileMetadata.cpp b/netwerk/cache2/CacheFileMetadata.cpp
index 86fc089aaf..27e8731996 100644
--- a/netwerk/cache2/CacheFileMetadata.cpp
+++ b/netwerk/cache2/CacheFileMetadata.cpp
@@ -21,7 +21,7 @@
namespace mozilla {
namespace net {
-#define kMinMetadataRead 1024 // TODO find optimal value from telemetry
+#define kMinMetadataRead 1024 // TODO find optimal value
#define kAlignSize 4096
// Most of the cache entries fit into one chunk due to current chunk size. Make
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);