diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2022-05-08 16:42:41 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2022-05-08 16:42:41 -0400 |
commit | 34964f0ea6b83234e47396441ca3b8334dbf0daa (patch) | |
tree | 570f0d78d7c2c8b38343a21cfb2e9e3d351f34e5 /components/migration/AutoMigrate.jsm | |
parent | 0e6fd39de109fa1020848fecddb5821501661ca7 (diff) | |
download | iceweasel-uxp-34964f0ea6b83234e47396441ca3b8334dbf0daa.tar.gz |
Remove telemetry more telemetry references
Diffstat (limited to 'components/migration/AutoMigrate.jsm')
-rw-r--r-- | components/migration/AutoMigrate.jsm | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/components/migration/AutoMigrate.jsm b/components/migration/AutoMigrate.jsm index 003f70d..93f1612 100644 --- a/components/migration/AutoMigrate.jsm +++ b/components/migration/AutoMigrate.jsm @@ -93,30 +93,20 @@ const AutoMigrate = { * failed for some reason. */ migrate(profileStartup, migratorKey, profileToMigrate) { - let histogram = Services.telemetry.getHistogramById( - "FX_STARTUP_MIGRATION_AUTOMATED_IMPORT_PROCESS_SUCCESS"); - histogram.add(0); let {migrator, pickedKey} = this.pickMigrator(migratorKey); - histogram.add(5); profileToMigrate = this.pickProfile(migrator, profileToMigrate); - histogram.add(10); let resourceTypes = migrator.getMigrateData(profileToMigrate, profileStartup); if (!(resourceTypes & this.resourceTypesToUse)) { throw new Error("No usable resources were found for the selected browser!"); } - histogram.add(15); let sawErrors = false; let migrationObserver = (subject, topic) => { if (topic == "Migration:ItemError") { sawErrors = true; } else if (topic == "Migration:Ended") { - histogram.add(25); - if (sawErrors) { - histogram.add(26); - } Services.obs.removeObserver(migrationObserver, "Migration:Ended"); Services.obs.removeObserver(migrationObserver, "Migration:ItemError"); Services.prefs.setCharPref(kAutoMigrateBrowserPref, pickedKey); @@ -132,7 +122,6 @@ const AutoMigrate = { Services.obs.addObserver(migrationObserver, "Migration:Ended", false); Services.obs.addObserver(migrationObserver, "Migration:ItemError", false); migrator.migrate(this.resourceTypesToUse, profileStartup, profileToMigrate); - histogram.add(20); }, /** @@ -209,50 +198,35 @@ const AutoMigrate = { undo: Task.async(function* () { let browserId = Preferences.get(kAutoMigrateBrowserPref, "unknown"); - let histogram = Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_AUTOMATED_IMPORT_UNDO"); - histogram.add(0); if (!(yield this.canUndo())) { - histogram.add(5); throw new Error("Can't undo!"); } this._pendingUndoTasks = true; this._removeNotificationBars(); - histogram.add(10); let readPromise = OS.File.read(kUndoStateFullPath, { encoding: "utf-8", compression: "lz4", }); let stateData = this._dejsonifyUndoState(yield readPromise); - histogram.add(12); this._errorMap = {bookmarks: 0, visits: 0, logins: 0}; - let reportErrorTelemetry = (type) => { - let histogramId = `FX_STARTUP_MIGRATION_UNDO_${type.toUpperCase()}_ERRORCOUNT`; - Services.telemetry.getKeyedHistogramById(histogramId).add(browserId, this._errorMap[type]); - }; yield this._removeUnchangedBookmarks(stateData.get("bookmarks")).catch(ex => { Cu.reportError("Uncaught exception when removing unchanged bookmarks!"); Cu.reportError(ex); }); - reportErrorTelemetry("bookmarks"); - histogram.add(15); yield this._removeSomeVisits(stateData.get("visits")).catch(ex => { Cu.reportError("Uncaught exception when removing history visits!"); Cu.reportError(ex); }); - reportErrorTelemetry("visits"); - histogram.add(20); yield this._removeUnchangedLogins(stateData.get("logins")).catch(ex => { Cu.reportError("Uncaught exception when removing unchanged logins!"); Cu.reportError(ex); }); - reportErrorTelemetry("logins"); - histogram.add(25); // This is async, but no need to wait for it. NewTabUtils.links.populateCache(() => { @@ -260,7 +234,6 @@ const AutoMigrate = { }, true); this._purgeUndoState(this.UNDO_REMOVED_REASON_UNDO_USED); - histogram.add(30); }), _removeNotificationBars() { @@ -288,10 +261,6 @@ const AutoMigrate = { let migrationBrowser = Preferences.get(kAutoMigrateBrowserPref, "unknown"); Services.prefs.clearUserPref(kAutoMigrateBrowserPref); - - let histogram = - Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_UNDO_REASON"); - histogram.add(migrationBrowser, reason); }, getBrowserUsedForMigration() { @@ -367,7 +336,6 @@ const AutoMigrate = { message, kNotificationId, null, notificationBox.PRIORITY_INFO_HIGH, buttons ); let remainingDays = Preferences.get(kAutoMigrateDaysToOfferUndoPref, 0); - Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_UNDO_OFFERED").add(4 - remainingDays); }), shouldStillShowUndoPrompt() { |