Bug 1706345: Do not report Telemetry for IPC based Principal vetting if chrome debugging is enabled r=freddyb,Honza,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D112931
This commit is contained in:
Christoph Kerschbaumer 2021-04-27 17:13:56 +00:00
Родитель 8728b54f4a
Коммит c6d613baa0
1 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -1312,10 +1312,15 @@ void ContentParent::LogAndAssertFailedPrincipalValidationInfo(
extra.AppendElement(EventExtraEntry{"principalType"_ns, principalType});
Telemetry::EventID eventType =
Telemetry::EventID::Security_Fissionprincipals_Contentparent;
Telemetry::RecordEvent(eventType, mozilla::Some(aMethod),
mozilla::Some(extra));
// Do not send telemetry when chrome-debugging is enabled
bool isChromeDebuggingEnabled =
Preferences::GetBool("devtools.chrome.enabled", false);
if (!isChromeDebuggingEnabled) {
Telemetry::EventID eventType =
Telemetry::EventID::Security_Fissionprincipals_Contentparent;
Telemetry::RecordEvent(eventType, mozilla::Some(aMethod),
mozilla::Some(extra));
}
// And log it
MOZ_LOG(