Bug 1596988 - remove telemetry ping 'AUTOPLAY_SITES_SETTING_CHANGE'. r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D53752

--HG--
extra : moz-landing-system : lando
This commit is contained in:
alwu 2019-11-19 14:39:16 +00:00
parent b45de81c28
commit 0d289c99b1
2 changed files with 0 additions and 76 deletions

View File

@ -735,60 +735,6 @@ static bool IsPersistentExpire(uint32_t aExpire, const nsACString& aType) {
return res;
}
static void UpdateAutoplayTelemetry(const nsACString& aType,
uint32_t aOldPermission,
uint32_t aNewPermission,
uint32_t aExpireType) {
if (!aType.EqualsLiteral("autoplay-media")) {
return;
}
if (aExpireType != nsIPermissionManager::EXPIRE_NEVER) {
return;
}
// Add permission
if (aOldPermission == nsIPermissionManager::UNKNOWN_ACTION) {
if (aNewPermission == nsIPermissionManager::ALLOW_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::AddAllow);
} else if (aNewPermission == nsIPermissionManager::DENY_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::AddBlock);
}
return;
}
// Remove permission
if (aNewPermission == nsIPermissionManager::UNKNOWN_ACTION) {
if (aOldPermission == nsIPermissionManager::ALLOW_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::
RemoveAllow);
} else if (aOldPermission == nsIPermissionManager::DENY_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::
RemoveBlock);
}
return;
}
// Change permission
if (aNewPermission == nsIPermissionManager::ALLOW_ACTION &&
aOldPermission == nsIPermissionManager::DENY_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::AddAllow);
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::RemoveBlock);
} else if (aNewPermission == nsIPermissionManager::DENY_ACTION &&
aOldPermission == nsIPermissionManager::ALLOW_ACTION) {
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::AddBlock);
AccumulateCategorical(
mozilla::Telemetry::LABELS_AUTOPLAY_SITES_SETTING_CHANGE::RemoveAllow);
}
}
} // namespace
////////////////////////////////////////////////////////////////////////////////
@ -1847,8 +1793,6 @@ nsresult nsPermissionManager::AddInternal(
}
case eOperationAdding: {
UpdateAutoplayTelemetry(aType, nsIPermissionManager::UNKNOWN_ACTION,
aPermission, aExpireType);
if (aDBOperation == eWriteToDB) {
// we'll be writing to the database - generate a known unique id
id = ++mLargestID;
@ -1893,9 +1837,6 @@ nsresult nsPermissionManager::AddInternal(
break;
}
UpdateAutoplayTelemetry(aType, oldPermissionEntry.mPermission,
nsIPermissionManager::UNKNOWN_ACTION,
aExpireType);
entry->GetPermissions().RemoveElementAt(index);
// Record a count of the number of preload permissions present in the
@ -1935,9 +1876,6 @@ nsresult nsPermissionManager::AddInternal(
break;
}
UpdateAutoplayTelemetry(aType, entry->GetPermissions()[index].mPermission,
aPermission, aExpireType);
// If the new expireType is EXPIRE_SESSION, then we have to keep a
// copy of the previous permission/expireType values. This cached value
// will be used when restoring the permissions of an app.

View File

@ -14721,20 +14721,6 @@
"description": "The number of times an AudioContext is allowed to start after being blocked, or the number of AudioContexts attempting to start which were never blocked or never allowed.",
"releaseChannelCollection": "opt-out"
},
"AUTOPLAY_SITES_SETTING_CHANGE": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],
"alert_emails": [
"alwu@mozilla.com",
"cpearce@mozilla.com"
],
"expires_in_version": "71",
"kind": "categorical",
"labels": ["AddAllow", "RemoveAllow", "AddBlock", "RemoveBlock"],
"bug_numbers": [1520361],
"description": "The number of times the user adds a site to the allow list, removes a site from the allow list, adds a site to the block list and removes a site from the block list.",
"releaseChannelCollection": "opt-out"
},
"MEDIA_PLAYED_TIME_AFTER_AUTOPLAY_BLOCKED": {
"record_in_processes": ["main", "content"],
"products": ["firefox", "fennec", "geckoview"],