Bug 1913624 - Remove expired telemetry histograms HTTP_AUTH_DIALOG_STATS_3 and HTTP_AUTH_TYPE_STATS, r=chutten,necko-reviewers,kershaw.

Depends on D219438

Differential Revision: https://phabricator.services.mozilla.com/D219439
This commit is contained in:
Florian Quèze 2024-08-20 10:26:50 +00:00
Родитель 4c8e00605d
Коммит ecb7569fa4
2 изменённых файлов: 0 добавлений и 83 удалений

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsIURL.h"
#include "mozilla/StaticPrefs_network.h"
#include "mozilla/StaticPrefs_prompts.h"
#include "mozilla/Telemetry.h"
#include "nsIProxiedChannel.h"
#include "nsIProxyInfo.h"
@ -51,20 +50,6 @@ namespace mozilla::net {
#define SUBRESOURCE_AUTH_DIALOG_DISALLOW_CROSS_ORIGIN 1
#define SUBRESOURCE_AUTH_DIALOG_ALLOW_ALL 2
#define HTTP_AUTH_DIALOG_TOP_LEVEL_DOC 29
#define HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE 30
#define HTTP_AUTH_DIALOG_SAME_ORIGIN_XHR 31
#define HTTP_AUTH_DIALOG_NON_WEB_CONTENT 32
#define HTTP_AUTH_BASIC_INSECURE 0
#define HTTP_AUTH_BASIC_SECURE 1
#define HTTP_AUTH_DIGEST_INSECURE 2
#define HTTP_AUTH_DIGEST_SECURE 3
#define HTTP_AUTH_NTLM_INSECURE 4
#define HTTP_AUTH_NTLM_SECURE 5
#define HTTP_AUTH_NEGOTIATE_INSECURE 6
#define HTTP_AUTH_NEGOTIATE_SECURE 7
#define MAX_DISPLAYED_USER_LENGTH 64
#define MAX_DISPLAYED_HOST_LENGTH 64
@ -951,31 +936,6 @@ nsresult nsHttpChannelAuthProvider::GetCredentialsForChallenge(
level = nsIAuthPrompt2::LEVEL_PW_ENCRYPTED;
}
// Collect statistics on how frequently the various types of HTTP
// authentication are used over SSL and non-SSL connections.
if (Telemetry::CanRecordPrereleaseData()) {
if ("basic"_ns.Equals(aAuthType, nsCaseInsensitiveCStringComparator)) {
Telemetry::Accumulate(
Telemetry::HTTP_AUTH_TYPE_STATS,
UsingSSL() ? HTTP_AUTH_BASIC_SECURE : HTTP_AUTH_BASIC_INSECURE);
} else if ("digest"_ns.Equals(aAuthType,
nsCaseInsensitiveCStringComparator)) {
Telemetry::Accumulate(
Telemetry::HTTP_AUTH_TYPE_STATS,
UsingSSL() ? HTTP_AUTH_DIGEST_SECURE : HTTP_AUTH_DIGEST_INSECURE);
} else if ("ntlm"_ns.Equals(aAuthType,
nsCaseInsensitiveCStringComparator)) {
Telemetry::Accumulate(
Telemetry::HTTP_AUTH_TYPE_STATS,
UsingSSL() ? HTTP_AUTH_NTLM_SECURE : HTTP_AUTH_NTLM_INSECURE);
} else if ("negotiate"_ns.Equals(aAuthType,
nsCaseInsensitiveCStringComparator)) {
Telemetry::Accumulate(Telemetry::HTTP_AUTH_TYPE_STATS,
UsingSSL() ? HTTP_AUTH_NEGOTIATE_SECURE
: HTTP_AUTH_NEGOTIATE_INSECURE);
}
}
// Depending on the pref setting, the authentication dialog may be
// blocked for all sub-resources, blocked for cross-origin
// sub-resources, or always allowed for sub-resources.
@ -1093,28 +1053,6 @@ bool nsHttpChannelAuthProvider::BlockPrompt(bool proxyAuth) {
}
}
if (Telemetry::CanRecordPrereleaseData()) {
if (topDoc) {
Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
HTTP_AUTH_DIALOG_TOP_LEVEL_DOC);
} else if (nonWebContent) {
Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
HTTP_AUTH_DIALOG_NON_WEB_CONTENT);
} else if (!mCrossOrigin) {
if (xhr) {
Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
HTTP_AUTH_DIALOG_SAME_ORIGIN_XHR);
} else {
Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE);
}
} else {
Telemetry::Accumulate(
Telemetry::HTTP_AUTH_DIALOG_STATS_3,
static_cast<uint32_t>(loadInfo->GetExternalContentPolicyType()));
}
}
if (!topDoc &&
!StaticPrefs::
network_auth_non_web_content_triggered_resources_http_auth_allow() &&

Просмотреть файл

@ -3575,27 +3575,6 @@
"n_buckets": 50,
"description": "The time spent relaying response completion from the socket thread of the parent process to the content process, in milliseconds, keyed by the classOfService flags"
},
"HTTP_AUTH_DIALOG_STATS_3": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],
"expires_in_version": "65",
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
"bug_numbers": [1357835],
"kind": "enumerated",
"n_values": 64,
"description": "Stats about what kind of resource requested http authentication. (29=top-level doc, 30=same origin subresources, 31=same origin xhr, 32=non-web-content, (nsIContentPolicy type)=cross-origin subresources per nsIContentPolicy type)"
},
"HTTP_AUTH_TYPE_STATS": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec"],
"alert_emails": ["rbarnes@mozilla.com"],
"bug_numbers": [1266571],
"expires_in_version": "52",
"kind": "enumerated",
"n_values": 8,
"releaseChannelCollection": "opt-out",
"description": "Recorded once for each HTTP 401 response. The value records the type of authentication and the TLS-enabled status. (0=basic/clear, 1=basic/tls, 2=digest/clear, 3=digest/tls, 4=ntlm/clear, 5=ntlm/tls, 6=negotiate/clear, 7=negotiate/tls)"
},
"HTTP_CHILD_OMT_STATS_2": {
"record_in_processes": ["content"],
"products": ["firefox", "fennec"],