mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-25 05:43:08 +09:00
Remove all C++ Telemetry Accumulation calls.
This creates a number of stubs and leaves some surrounding code that may be irrelevant (eg. recorded time stamps, status variables). Stub resolution/removal should be a follow-up to this.
This commit is contained in:
parent
ac3468d5cc
commit
8c8145e620
186 changed files with 48 additions and 2957 deletions
|
|
@ -1972,71 +1972,7 @@ nsDocShell::GetCharset(nsACString& aCharset)
|
|||
NS_IMETHODIMP
|
||||
nsDocShell::GatherCharsetMenuTelemetry()
|
||||
{
|
||||
nsCOMPtr<nsIContentViewer> viewer;
|
||||
GetContentViewer(getter_AddRefs(viewer));
|
||||
if (!viewer) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIDocument* doc = viewer->GetDocument();
|
||||
if (!doc || doc->WillIgnoreCharsetOverride()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_USED, true);
|
||||
|
||||
bool isFileURL = false;
|
||||
nsIURI* url = doc->GetOriginalURI();
|
||||
if (url) {
|
||||
url->SchemeIs("file", &isFileURL);
|
||||
}
|
||||
|
||||
int32_t charsetSource = doc->GetDocumentCharacterSetSource();
|
||||
switch (charsetSource) {
|
||||
case kCharsetFromTopLevelDomain:
|
||||
// Unlabeled doc on a domain that we map to a fallback encoding
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 7);
|
||||
break;
|
||||
case kCharsetFromFallback:
|
||||
case kCharsetFromDocTypeDefault:
|
||||
case kCharsetFromCache:
|
||||
case kCharsetFromParentFrame:
|
||||
case kCharsetFromHintPrevDoc:
|
||||
// Changing charset on an unlabeled doc.
|
||||
if (isFileURL) {
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 0);
|
||||
} else {
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 1);
|
||||
}
|
||||
break;
|
||||
case kCharsetFromAutoDetection:
|
||||
// Changing charset on unlabeled doc where chardet fired
|
||||
if (isFileURL) {
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 2);
|
||||
} else {
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 3);
|
||||
}
|
||||
break;
|
||||
case kCharsetFromMetaPrescan:
|
||||
case kCharsetFromMetaTag:
|
||||
case kCharsetFromChannel:
|
||||
// Changing charset on a doc that had a charset label.
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 4);
|
||||
break;
|
||||
case kCharsetFromParentForced:
|
||||
case kCharsetFromUserForced:
|
||||
// Changing charset on a document that already had an override.
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 5);
|
||||
break;
|
||||
case kCharsetFromIrreversibleAutoDetection:
|
||||
case kCharsetFromOtherComponent:
|
||||
case kCharsetFromByteOrderMark:
|
||||
case kCharsetUninitialized:
|
||||
default:
|
||||
// Bug. This isn't supposed to happen.
|
||||
Telemetry::Accumulate(Telemetry::CHARSET_OVERRIDE_SITUATION, 6);
|
||||
break;
|
||||
}
|
||||
/* STUB */
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
@ -5062,10 +4998,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
|||
errorPage.Assign(alternateErrorPage);
|
||||
}
|
||||
|
||||
if (!IsFrame() && errorPage.EqualsIgnoreCase("certerror")) {
|
||||
Telemetry::Accumulate(mozilla::Telemetry::SECURITY_UI, bucketId);
|
||||
}
|
||||
|
||||
} else {
|
||||
error.AssignLiteral("nssFailure2");
|
||||
}
|
||||
|
|
@ -5105,10 +5037,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
|||
: nsISecurityUITelemetry::WARNING_UNWANTED_PAGE_TOP;
|
||||
}
|
||||
|
||||
if (sendTelemetry && errorPage.EqualsIgnoreCase("blocked")) {
|
||||
Telemetry::Accumulate(Telemetry::SECURITY_UI, bucketId);
|
||||
}
|
||||
|
||||
cssClass.AssignLiteral("blacklist");
|
||||
} else if (NS_ERROR_CONTENT_CRASHED == aError) {
|
||||
errorPage.AssignLiteral("tabcrashed");
|
||||
|
|
@ -7622,8 +7550,6 @@ nsDocShell::EndPageLoad(nsIWebProgress* aProgress,
|
|||
TimeStamp channelCreationTime;
|
||||
rv = timingChannel->GetChannelCreation(&channelCreationTime);
|
||||
if (NS_SUCCEEDED(rv) && !channelCreationTime.IsNull()) {
|
||||
Telemetry::AccumulateTimeDelta(Telemetry::TOTAL_CONTENT_PAGE_LOAD_TIME,
|
||||
channelCreationTime);
|
||||
nsCOMPtr<nsPILoadGroupInternal> internalLoadGroup =
|
||||
do_QueryInterface(mLoadGroup);
|
||||
if (internalLoadGroup) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue