1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 05:46:58 +00:00

Issue #21 - Remove remaining telemetry structs, callers and flags.

This commit is contained in:
Moonchild
2021-11-01 14:48:34 +00:00
committed by roytam1
parent 2564be2d79
commit eaf9e756a0
50 changed files with 31 additions and 500 deletions
@@ -2985,35 +2985,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
@@ -3896,8 +3867,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