summaryrefslogtreecommitdiff
path: root/docshell
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-03 10:11:38 +0200
commitab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (patch)
treec44670a25d942a672951e430499f70978ec7d337 /docshell
parent45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff)
downloaduxp-ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2.tar.gz
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.
Diffstat (limited to 'docshell')
-rw-r--r--docshell/base/nsDocShell.cpp76
1 files changed, 1 insertions, 75 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index f4840297d2..ae307431d9 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -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) {