зеркало из https://github.com/mozilla/gecko-dev.git
Bug 767471 - Report telemetry data for if the MozillaMaintenance service was ever manually uninstalled. r=rstrong
This commit is contained in:
Родитель
171aedf355
Коммит
d4c06e7821
|
@ -164,9 +164,9 @@ UpdateServiceDescription(SC_HANDLE serviceHandle)
|
|||
* Determines if the MozillaMaintenance service path needs to be updated
|
||||
* and fixes it if it is wrong.
|
||||
*
|
||||
* @param service A handle to the service to fix.
|
||||
* @param currentServicePath The current (possibly wrong) path that is used.
|
||||
* @param wasFixNeeded Out parameter set to TRUE if a fix was needed.
|
||||
* @param service A handle to the service to fix.
|
||||
* @param currentServicePath The current (possibly wrong) path that is used.
|
||||
* @param servicePathWasWrong Out parameter set to TRUE if a fix was needed.
|
||||
* @return TRUE if the service path is now correct.
|
||||
*/
|
||||
BOOL
|
||||
|
|
|
@ -319,6 +319,7 @@ HISTOGRAM_BOOLEAN(UPDATER_UPDATES_AUTOMATIC, "Updater: Whether or not updates ar
|
|||
HISTOGRAM_BOOLEAN(UPDATER_SERVICE_ENABLED, "Updater: Whether or not the MozillaMaintenance service is enabled")
|
||||
HISTOGRAM(UPDATER_SERVICE_ERRORS, 1, 30, 31, LINEAR, "Updater: The number of MozillaMaintenance service errors that have occurred")
|
||||
HISTOGRAM_BOOLEAN(UPDATER_SERVICE_INSTALLED, "Updater: Whether or not the MozillaMaintenance service is installed")
|
||||
HISTOGRAM_BOOLEAN(UPDATER_SERVICE_MANUALLY_UNINSTALLED, "Updater: Whether or not someone manually uninstalled the service.")
|
||||
HISTOGRAM_BOOLEAN(UPDATER_STAGE_ENABLED, "Updater: Whether or not staging updates are enabled")
|
||||
HISTOGRAM_BOOLEAN(UPDATER_HAS_PERMISSIONS, "Updater: Whether or not the updater has permissions")
|
||||
|
||||
|
|
|
@ -1698,15 +1698,19 @@ UpdateService.prototype = {
|
|||
/**
|
||||
* Submit a telemetry ping with a boolean value which indicates if the service
|
||||
* is installed.
|
||||
* Also submits a telemetry ping with a boolean value which indicates if the
|
||||
* service was at some point installed, but is now uninstalled.
|
||||
*/
|
||||
_sendServiceInstalledTelemetryPing: function AUS__svcInstallTelemetryPing() {
|
||||
let installed = 0;
|
||||
let attempted = 0;
|
||||
try {
|
||||
let wrk = Components.classes["@mozilla.org/windows-registry-key;1"]
|
||||
.createInstance(Components.interfaces.nsIWindowsRegKey);
|
||||
wrk.open(wrk.ROOT_KEY_LOCAL_MACHINE,
|
||||
"SOFTWARE\\Mozilla\\MaintenanceService",
|
||||
wrk.ACCESS_READ | wrk.WOW64_64);
|
||||
attempted = wrk.readIntValue("Attempted");
|
||||
installed = wrk.readIntValue("Installed");
|
||||
wrk.close();
|
||||
} catch(e) {
|
||||
|
@ -1718,6 +1722,13 @@ UpdateService.prototype = {
|
|||
// Don't allow any exception to be propagated.
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
try {
|
||||
let h = Services.telemetry.getHistogramById("UPDATER_SERVICE_MANUALLY_UNINSTALLED");
|
||||
h.add(!installed && attempted ? 1 : 0);
|
||||
} catch(e) {
|
||||
// Don't allow any exception to be propagated.
|
||||
Components.utils.reportError(e);
|
||||
}
|
||||
},
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче