зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1702248 - Limit encoding detection outcome telemetry to top level and to text/html and text/plain. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D110902
This commit is contained in:
Родитель
b63b46f586
Коммит
29b3230825
|
@ -210,9 +210,24 @@ nsHtml5TreeOpExecutor::DidBuildModel(bool aTerminated) {
|
|||
if (mStarted) {
|
||||
mDocument->EndLoad();
|
||||
|
||||
// Gather telemetry only for top-level content navigations in order to
|
||||
// avoid noise from ad iframes.
|
||||
bool topLevel = false;
|
||||
if (BrowsingContext* bc = mDocument->GetBrowsingContext()) {
|
||||
topLevel = bc->IsTopContent();
|
||||
}
|
||||
|
||||
// Gather telemetry only for text/html and text/plain (excluding CSS, JS,
|
||||
// etc. being viewed as text.)
|
||||
nsAutoString contentType;
|
||||
mDocument->GetContentType(contentType);
|
||||
bool htmlOrPlain = contentType.EqualsLiteral(u"text/html") ||
|
||||
contentType.EqualsLiteral(u"text/plain");
|
||||
|
||||
// Gather chardetng telemetry
|
||||
MOZ_ASSERT(mDocument->IsHTMLDocument());
|
||||
if (!aTerminated && !mDocument->AsHTMLDocument()->IsViewSource()) {
|
||||
if (htmlOrPlain && topLevel && !aTerminated &&
|
||||
!mDocument->AsHTMLDocument()->IsViewSource()) {
|
||||
// We deliberately measure only normally-completed (non-aborted) loads
|
||||
// that are not View Source loads. This seems like a better place for
|
||||
// checking normal completion than anything in nsHtml5StreamParser.
|
||||
|
|
|
@ -8533,7 +8533,7 @@
|
|||
"record_in_processes": ["main", "content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["hsivonen@mozilla.com"],
|
||||
"bug_numbers": [1686463],
|
||||
"bug_numbers": [1686463, 1702248],
|
||||
"expires_in_version": "91",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"kind": "categorical",
|
||||
|
@ -8544,7 +8544,7 @@
|
|||
"record_in_processes": ["main", "content"],
|
||||
"products": ["firefox"],
|
||||
"alert_emails": ["hsivonen@mozilla.com"],
|
||||
"bug_numbers": [1686463],
|
||||
"bug_numbers": [1686463, 1702248],
|
||||
"expires_in_version": "91",
|
||||
"releaseChannelCollection": "opt-out",
|
||||
"kind": "categorical",
|
||||
|
|
Загрузка…
Ссылка в новой задаче