diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index d8aa5d83de7d..3ab389937e10 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -3114,6 +3114,24 @@ update: operating_systems: - windows + fix_permissions_attempted: + bug_numbers: + - 1577317 + description: Set when we attempt to fix update directory permissions. + expires: "76" + kind: boolean + notification_emails: + - application-update-telemetry-alerts@mozilla.com + - agashlin@mozilla.com + - rstrong@mozilla.com + release_channel_collection: opt-out + products: + - 'firefox' + record_in_processes: + - main + operating_systems: + - windows + update.startup: from_app_version: bug_numbers: diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm index 442d3e5185ae..ca83dcfeba2d 100644 --- a/toolkit/mozapps/update/UpdateService.jsm +++ b/toolkit/mozapps/update/UpdateService.jsm @@ -1392,6 +1392,8 @@ function fixUpdateDirectoryPermissions() { if (!gUpdateDirPermissionFixAttempted) { // Never try to fix permissions more than one time during a session. gUpdateDirPermissionFixAttempted = true; + AUSTLMY.pingFixUpdateDirectoryPermissionsAttempted(); + LOG("Attempting to fix update directory permissions"); try { Cc["@mozilla.org/updates/update-processor;1"] diff --git a/toolkit/mozapps/update/UpdateTelemetry.jsm b/toolkit/mozapps/update/UpdateTelemetry.jsm index 5dbdde6fc413..074ebcfeb3da 100644 --- a/toolkit/mozapps/update/UpdateTelemetry.jsm +++ b/toolkit/mozapps/update/UpdateTelemetry.jsm @@ -642,6 +642,18 @@ var AUSTLMY = { } }, + /** + * Submit a telemetry ping for a boolean scalar when we attempt to fix + * the update directory permissions this session. + */ + pingFixUpdateDirectoryPermissionsAttempted: function UT_PFUDPA() { + try { + Services.telemetry.scalarSet("update.fix_permissions_attempted", true); + } catch (e) { + Cu.reportError(e); + } + }, + /** * Submit a telemetry ping for a count type histogram when the expected value * does not equal the boolean value of a pref or if the pref isn't present