diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-09-03 18:26:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-03 18:26:19 +0200 |
commit | 2e00eb87ef299e6eb7521670e6a6720fee19f5fc (patch) | |
tree | c44670a25d942a672951e430499f70978ec7d337 /docshell | |
parent | 45f9a0daad81d1c6a1188b3473e5f0c67d27c0aa (diff) | |
parent | ab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (diff) | |
download | UXP-2e00eb87ef299e6eb7521670e6a6720fee19f5fc.tar UXP-2e00eb87ef299e6eb7521670e6a6720fee19f5fc.tar.gz UXP-2e00eb87ef299e6eb7521670e6a6720fee19f5fc.tar.lz UXP-2e00eb87ef299e6eb7521670e6a6720fee19f5fc.tar.xz UXP-2e00eb87ef299e6eb7521670e6a6720fee19f5fc.zip |
Merge pull request #745 from MoonchildProductions/Kill-Telemetry
Remove all C++ Telemetry Accumulation calls.
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/nsDocShell.cpp | 76 |
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) { |