summaryrefslogtreecommitdiffstats
path: root/docshell
diff options
context:
space:
mode:
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 f4840297d..ae307431d 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) {