mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #21 - Remove remaining telemetry structs, callers and flags.
This commit is contained in:
parent
2564be2d79
commit
eaf9e756a0
50 changed files with 31 additions and 500 deletions
|
|
@ -492,13 +492,6 @@ Predictor::GetParallelSpeculativeConnectLimit(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Predictor::GetIsFromPredictor(bool *isFromPredictor)
|
||||
{
|
||||
*isFromPredictor = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
Predictor::GetAllow1918(bool *allow1918)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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/. */
|
||||
|
|
@ -29,20 +28,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.
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
2
netwerk/cache/nsDiskCache.h
vendored
2
netwerk/cache/nsDiskCache.h
vendored
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1061,13 +1061,6 @@ AltSvcOverride::GetParallelSpeculativeConnectLimit(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AltSvcOverride::GetIsFromPredictor(bool *isFromPredictor)
|
||||
{
|
||||
*isFromPredictor = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AltSvcOverride::GetAllow1918(bool *allow)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
@ -6652,41 +6649,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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -2884,13 +2876,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;
|
||||
}
|
||||
|
||||
|
|
@ -2900,7 +2890,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"));
|
||||
|
|
@ -2949,7 +2939,6 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
|||
, mDispatchedMTransaction(false)
|
||||
, mCaps(caps)
|
||||
, mSpeculative(false)
|
||||
, mIsFromPredictor(false)
|
||||
, mAllow1918(true)
|
||||
, mHasConnected(false)
|
||||
, mPrimaryConnectedOK(false)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -532,7 +523,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();
|
||||
|
|
|
|||
|
|
@ -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/. */
|
||||
|
|
@ -1505,8 +1504,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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ private:
|
|||
void GeneratePong(uint8_t *payload, uint32_t len);
|
||||
void GeneratePing();
|
||||
|
||||
nsresult OnNetworkChangedTargetThread();
|
||||
nsresult OnNetworkChangedTargetThread();
|
||||
nsresult OnNetworkChanged();
|
||||
nsresult StartPinging();
|
||||
|
||||
|
|
@ -158,7 +158,6 @@ private:
|
|||
nsresult DoAdmissionDNS();
|
||||
nsresult StartWebsocketData();
|
||||
uint16_t ResultToCloseCode(nsresult resultCode);
|
||||
void ReportConnectionTelemetry();
|
||||
|
||||
void StopSession(nsresult reason);
|
||||
void AbortSession(nsresult reason);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue