summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/migration/AutoMigrate.jsm32
-rw-r--r--components/migration/FirefoxProfileMigrator.js71
-rw-r--r--components/migration/MigrationUtils.jsm26
-rw-r--r--components/migration/content/migration.js68
-rw-r--r--components/nsBrowserGlue.js1
-rw-r--r--components/places/content/browserPlacesViews.js3
-rw-r--r--components/places/content/places.js2
-rw-r--r--components/preferences/in-content/content.js5
-rw-r--r--components/preferences/in-content/preferences.js34
-rw-r--r--components/search/content/searchReset.js22
-rw-r--r--components/search/service/nsSearchService.js24
-rw-r--r--components/sessionstore/SessionFile.jsm27
-rw-r--r--components/sessionstore/SessionStore.jsm33
-rw-r--r--components/sessionstore/SessionWorker.js5
-rw-r--r--components/sessionstore/StartupPerformance.jsm12
-rw-r--r--components/sessionstore/content/content-sessionStore.js19
-rw-r--r--components/sessionstore/nsSessionStartup.js5
17 files changed, 7 insertions, 382 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() {
diff --git a/components/migration/FirefoxProfileMigrator.js b/components/migration/FirefoxProfileMigrator.js
index f0339f6..c88ce0d 100644
--- a/components/migration/FirefoxProfileMigrator.js
+++ b/components/migration/FirefoxProfileMigrator.js
@@ -170,77 +170,8 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD
};
}
- // Telemetry related migrations.
- let times = {
- name: "times", // name is used only by tests.
- type: types.OTHERDATA,
- migrate: aCallback => {
- let file = this._getFileObject(sourceProfileDir, "times.json");
- if (file) {
- file.copyTo(currentProfileDir, "");
- }
- // And record the fact a migration (ie, a reset) happened.
- let timesAccessor = new ProfileAge(currentProfileDir.path);
- timesAccessor.recordProfileReset().then(
- () => aCallback(true),
- () => aCallback(false)
- );
- }
- };
- let telemetry = {
- name: "telemetry", // name is used only by tests...
- type: types.OTHERDATA,
- migrate: aCallback => {
- let createSubDir = (name) => {
- let dir = currentProfileDir.clone();
- dir.append(name);
- dir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
- return dir;
- };
-
- // If the 'datareporting' directory exists we migrate files from it.
- let haveStateFile = false;
- let dataReportingDir = this._getFileObject(sourceProfileDir, "datareporting");
- if (dataReportingDir && dataReportingDir.isDirectory()) {
- // Copy only specific files.
- let toCopy = ["state.json", "session-state.json"];
-
- let dest = createSubDir("datareporting");
- let enumerator = dataReportingDir.directoryEntries;
- while (enumerator.hasMoreElements()) {
- let file = enumerator.getNext().QueryInterface(Ci.nsIFile);
- if (file.isDirectory() || toCopy.indexOf(file.leafName) == -1) {
- continue;
- }
-
- if (file.leafName == "state.json") {
- haveStateFile = true;
- }
- file.copyTo(dest, "");
- }
- }
-
- if (!haveStateFile) {
- // Fall back to migrating the state file that contains the client id from healthreport/.
- // We first moved the client id management from the FHR implementation to the datareporting
- // service.
- // Consequently, we try to migrate an existing FHR state file here as a fallback.
- let healthReportDir = this._getFileObject(sourceProfileDir, "healthreport");
- if (healthReportDir && healthReportDir.isDirectory()) {
- let stateFile = this._getFileObject(healthReportDir, "state.json");
- if (stateFile) {
- let dest = createSubDir("healthreport");
- stateFile.copyTo(dest, "");
- }
- }
- }
-
- aCallback(true);
- }
- };
-
return [places, cookies, passwords, formData, dictionary, bookmarksBackups,
- session, times, telemetry].filter(r => r);
+ session].filter(r => r);
};
Object.defineProperty(FirefoxProfileMigrator.prototype, "startupOnlyMigrator", {
diff --git a/components/migration/MigrationUtils.jsm b/components/migration/MigrationUtils.jsm
index 752e752..e40b437 100644
--- a/components/migration/MigrationUtils.jsm
+++ b/components/migration/MigrationUtils.jsm
@@ -265,27 +265,6 @@ this.MigratorPrototype = {
let maybeFinishResponsivenessMonitor = (responsivenessMonitor, histogramId) => {
if (responsivenessMonitor) {
let accumulatedDelay = responsivenessMonitor.finish();
- if (histogramId) {
- try {
- Services.telemetry.getKeyedHistogramById(histogramId)
- .add(browserKey, accumulatedDelay);
- } catch (ex) {
- Cu.reportError(histogramId + ": " + ex);
- }
- }
- }
- };
-
- let collectQuantityTelemetry = () => {
- for (let resourceType of Object.keys(MigrationUtils._importQuantities)) {
- let histogramId =
- "FX_MIGRATION_" + resourceType.toUpperCase() + "_QUANTITY";
- try {
- Services.telemetry.getKeyedHistogramById(histogramId)
- .add(browserKey, MigrationUtils._importQuantities[resourceType]);
- } catch (ex) {
- Cu.reportError(histogramId + ": " + ex);
- }
}
};
@@ -331,7 +310,6 @@ this.MigratorPrototype = {
maybeFinishResponsivenessMonitor(responsivenessMonitor, responsivenessHistogramId);
if (resourcesGroupedByItems.size == 0) {
- collectQuantityTelemetry();
notify("Migration:Ended");
}
}
@@ -803,7 +781,6 @@ this.MigrationUtils = Object.freeze({
* - {String} an identifier for the profile to use when migrating
* NB: If you add new consumers, please add a migration entry point
* constant below, and specify at least the first element of the array
- * (the migration entry point for purposes of telemetry).
*/
showMigrationWizard:
function MU_showMigrationWizard(aOpener, aParams) {
@@ -1096,7 +1073,4 @@ this.MigrationUtils = Object.freeze({
"safari": 8,
"360se": 9,
},
- getSourceIdForTelemetry(sourceName) {
- return this._sourceNameToIdMapping[sourceName] || 0;
- },
});
diff --git a/components/migration/content/migration.js b/components/migration/content/migration.js
index eb21756..cfdf48f 100644
--- a/components/migration/content/migration.js
+++ b/components/migration/content/migration.js
@@ -35,7 +35,6 @@ var MigrationWizard = { /* exported MigrationWizard */
let args = window.arguments;
let entryPointId = args[0] || MigrationUtils.MIGRATION_ENTRYPOINT_UNKNOWN;
- Services.telemetry.getHistogramById("FX_MIGRATION_ENTRY_POINT").add(entryPointId);
this.isInitialMigration = entryPointId == MigrationUtils.MIGRATION_ENTRYPOINT_FIRSTRUN;
if (args.length > 1) {
@@ -105,15 +104,6 @@ var MigrationWizard = { /* exported MigrationWizard */
}
}
}
- if (this.isInitialMigration) {
- Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_BROWSER_COUNT")
- .add(this._availableMigrators.length);
- let defaultBrowser = MigrationUtils.getMigratorKeyForDefaultBrowser();
- // This will record 0 for unknown default browser IDs.
- defaultBrowser = MigrationUtils.getSourceIdForTelemetry(defaultBrowser);
- Services.telemetry.getHistogramById("FX_STARTUP_MIGRATION_EXISTING_DEFAULT_BROWSER")
- .add(defaultBrowser);
- }
group.addEventListener("command", toggleCloseBrowserWarning);
@@ -142,11 +132,6 @@ var MigrationWizard = { /* exported MigrationWizard */
var newSource = document.getElementById("importSourceGroup").selectedItem.id;
if (newSource == "nothing") {
- // Need to do telemetry here because we're closing the dialog before we get to
- // do actual migration. For actual migration, this doesn't happen until after
- // migration takes place.
- Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
- .add(MigrationUtils.getSourceIdForTelemetry("nothing"));
document.documentElement.cancel();
return false;
}
@@ -366,21 +351,6 @@ var MigrationWizard = { /* exported MigrationWizard */
onMigratingMigrate: function ()
{
this._migrator.migrate(this._itemsFlags, this._autoMigrate, this._selectedProfile);
-
- Services.telemetry.getHistogramById("FX_MIGRATION_SOURCE_BROWSER")
- .add(MigrationUtils.getSourceIdForTelemetry(this._source));
- if (!this._autoMigrate) {
- let hist = Services.telemetry.getKeyedHistogramById("FX_MIGRATION_USAGE");
- let exp = 0;
- let items = this._itemsFlags;
- while (items) {
- if (items & 1) {
- hist.add(this._source, exp);
- }
- items = items >> 1;
- exp++;
- }
- }
},
_listItems: function (aID)
@@ -426,18 +396,8 @@ var MigrationWizard = { /* exported MigrationWizard */
label.removeAttribute("style");
break;
case "Migration:Ended":
- if (this.isInitialMigration) {
- // Ensure errors in reporting data recency do not affect the rest of the migration.
- try {
- this.reportDataRecencyTelemetry();
- } catch (ex) {
- Cu.reportError(ex);
- }
- }
if (this._autoMigrate) {
let hasImportedHomepage = !!(this._newHomePage && this._newHomePage != "DEFAULT");
- Services.telemetry.getKeyedHistogramById("FX_MIGRATION_IMPORTED_HOMEPAGE")
- .add(this._source, hasImportedHomepage);
if (this._newHomePage) {
try {
// set homepage properly
@@ -508,8 +468,6 @@ var MigrationWizard = { /* exported MigrationWizard */
Cc["@mozilla.org/consoleservice;1"]
.getService(Ci.nsIConsoleService)
.logStringMessage("some " + type + " did not successfully migrate.");
- Services.telemetry.getKeyedHistogramById("FX_MIGRATION_ERRORS")
- .add(this._source, Math.log2(numericType));
break;
}
},
@@ -520,30 +478,4 @@ var MigrationWizard = { /* exported MigrationWizard */
this._wiz.canRewind = false;
this._listItems("doneItems");
},
-
- reportDataRecencyTelemetry() {
- let histogram = Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_DATA_RECENCY");
- let lastUsedPromises = [];
- for (let [key, migrator] of this._availableMigrators) {
- // No block-scoped let in for...of loop conditions, so get the source:
- let localKey = key;
- lastUsedPromises.push(migrator.getLastUsedDate().then(date => {
- const ONE_YEAR = 24 * 365;
- let diffInHours = Math.round((Date.now() - date) / (60 * 60 * 1000));
- if (diffInHours > ONE_YEAR) {
- diffInHours = ONE_YEAR;
- }
- histogram.add(localKey, diffInHours);
- return [localKey, diffInHours];
- }));
- }
- Promise.all(lastUsedPromises).then(migratorUsedTimeDiff => {
- // Sort low to high.
- migratorUsedTimeDiff.sort(([keyA, diffA], [keyB, diffB]) => diffA - diffB); /* eslint no-unused-vars: off */
- let usedMostRecentBrowser = migratorUsedTimeDiff.length && this._source == migratorUsedTimeDiff[0][0];
- let usedRecentBrowser =
- Services.telemetry.getKeyedHistogramById("FX_STARTUP_MIGRATION_USED_RECENT_BROWSER");
- usedRecentBrowser.add(this._source, usedMostRecentBrowser);
- });
- },
};
diff --git a/components/nsBrowserGlue.js b/components/nsBrowserGlue.js
index 8d66c47..211b16c 100644
--- a/components/nsBrowserGlue.js
+++ b/components/nsBrowserGlue.js
@@ -306,7 +306,6 @@ BrowserGlue.prototype = {
} catch (ex) {
Cu.reportError(ex);
}
- let win = RecentWindow.getMostRecentBrowserWindow();
break;
case "browser-search-engine-modified":
// Ensure we cleanup the hiddenOneOffs pref when removing
diff --git a/components/places/content/browserPlacesViews.js b/components/places/content/browserPlacesViews.js
index c6ee9b6..bab8825 100644
--- a/components/places/content/browserPlacesViews.js
+++ b/components/places/content/browserPlacesViews.js
@@ -980,9 +980,6 @@ function PlacesToolbar(aPlace) {
}
PlacesViewBase.call(this, aPlace);
-
- Services.telemetry.getHistogramById("FX_BOOKMARKS_TOOLBAR_INIT_MS")
- .add(Date.now() - startTime);
}
PlacesToolbar.prototype = {
diff --git a/components/places/content/places.js b/components/places/content/places.js
index 375c3de..529f192 100644
--- a/components/places/content/places.js
+++ b/components/places/content/places.js
@@ -17,7 +17,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "DownloadUtils",
"resource://gre/modules/DownloadUtils.jsm");
const RESTORE_FILEPICKER_FILTER_EXT = "*.json;*.jsonlz4";
-const HISTORY_LIBRARY_SEARCH_TELEMETRY = "PLACES_HISTORY_LIBRARY_SEARCH_TIME_MS";
var PlacesOrganizer = {
_places: null,
@@ -360,7 +359,6 @@ var PlacesOrganizer = {
* cookies, history, preferences, and bookmarks.
*/
importFromBrowser: function PO_importFromBrowser() {
- // We pass in the type of source we're using for use in telemetry:
MigrationUtils.showMigrationWizard(window, [MigrationUtils.MIGRATION_ENTRYPOINT_PLACES]);
},
diff --git a/components/preferences/in-content/content.js b/components/preferences/in-content/content.js
index a2a3e8a..d0423bf 100644
--- a/components/preferences/in-content/content.js
+++ b/components/preferences/in-content/content.js
@@ -101,11 +101,6 @@ var gContentPane = {
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
"resizable=yes", params);
-
- try {
- Services.telemetry
- .getHistogramById("WEB_NOTIFICATION_EXCEPTIONS_OPENED").add();
- } catch (e) {}
},
diff --git a/components/preferences/in-content/preferences.js b/components/preferences/in-content/preferences.js
index 69cb180..f6a6941 100644
--- a/components/preferences/in-content/preferences.js
+++ b/components/preferences/in-content/preferences.js
@@ -124,36 +124,6 @@ function init_dynamic_padding() {
document.documentElement.appendChild(mediaStyle);
}
-function telemetryBucketForCategory(category) {
- switch (category) {
- case "general":
- case "search":
- case "content":
- case "applications":
- case "privacy":
- case "security":
- case "sync":
- return category;
- case "advanced":
- let advancedPaneTabs = document.getElementById("advancedPrefs");
- switch (advancedPaneTabs.selectedTab.id) {
- case "generalTab":
- return "advancedGeneral";
- case "dataChoicesTab":
- return "advancedDataChoices";
- case "networkTab":
- return "advancedNetwork";
- case "updateTab":
- return "advancedUpdates";
- case "encryptionTab":
- return "advancedCerts";
- }
- // fall-through for unknown.
- default:
- return "unknown";
- }
-}
-
function onHashChange() {
gotoPref();
}
@@ -194,10 +164,6 @@ function gotoPref(aCategory) {
search(category, "data-category");
let mainContent = document.querySelector(".main-content");
mainContent.scrollTop = 0;
-
- Services.telemetry
- .getHistogramById("FX_PREFERENCES_CATEGORY_OPENED")
- .add(telemetryBucketForCategory(friendlyName));
}
function search(aQuery, aAttribute) {
diff --git a/components/search/content/searchReset.js b/components/search/content/searchReset.js
index b541d41..bb01233 100644
--- a/components/search/content/searchReset.js
+++ b/components/search/content/searchReset.js
@@ -8,14 +8,6 @@ var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
-const TELEMETRY_RESULT_ENUM = {
- RESTORED_DEFAULT: 0,
- KEPT_CURRENT: 1,
- CHANGED_ENGINE: 2,
- CLOSED_PAGE: 3,
- OPENED_SETTINGS: 4
-};
-
window.onload = function() {
let defaultEngine = document.getElementById("defaultEngine");
let originalDefault = Services.search.originalDefaultEngine;
@@ -24,9 +16,6 @@ window.onload = function() {
'url("' + originalDefault.iconURI.spec + '")';
document.getElementById("searchResetChangeEngine").focus();
- window.addEventListener("unload", recordPageClosed);
- document.getElementById("linkSettingsPage")
- .addEventListener("click", openingSettings);
};
function doSearch() {
@@ -46,8 +35,6 @@ function doSearch() {
let engine = Services.search.currentEngine;
let submission = engine.getSubmission(queryString, null, purpose);
- window.removeEventListener("unload", recordPageClosed);
-
let win = window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
@@ -58,8 +45,6 @@ function doSearch() {
}
function openingSettings() {
- record(TELEMETRY_RESULT_ENUM.OPENED_SETTINGS);
- window.removeEventListener("unload", recordPageClosed);
}
function record(result) {
@@ -70,7 +55,6 @@ function keepCurrentEngine() {
// Calling the currentEngine setter will force a correct loadPathHash to be
// written for this engine, so that we don't prompt the user again.
Services.search.currentEngine = Services.search.currentEngine;
- record(TELEMETRY_RESULT_ENUM.KEPT_CURRENT);
doSearch();
}
@@ -80,11 +64,5 @@ function changeSearchEngine() {
engine.hidden = false;
Services.search.currentEngine = engine;
- record(TELEMETRY_RESULT_ENUM.RESTORED_DEFAULT);
-
doSearch();
}
-
-function recordPageClosed() {
- record(TELEMETRY_RESULT_ENUM.CLOSED_PAGE);
-}
diff --git a/components/search/service/nsSearchService.js b/components/search/service/nsSearchService.js
index b4db31d..aaa719e 100644
--- a/components/search/service/nsSearchService.js
+++ b/components/search/service/nsSearchService.js
@@ -2309,8 +2309,6 @@ SearchService.prototype = {
this._initObservers.resolve(this._initRV);
Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "init-complete");
- Services.telemetry.getHistogramById("SEARCH_SERVICE_INIT_SYNC").add(true);
- this._recordEngineTelemetry();
LOG("_syncInit end");
},
@@ -2348,8 +2346,6 @@ SearchService.prototype = {
this._cacheFileJSON = null;
this._initObservers.resolve(this._initRV);
Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "init-complete");
- Services.telemetry.getHistogramById("SEARCH_SERVICE_INIT_SYNC").add(false);
- this._recordEngineTelemetry();
LOG("_asyncInit: Completed _asyncInit");
}),
@@ -2715,7 +2711,6 @@ SearchService.prototype = {
// Typically we'll re-init as a result of a pref observer,
// so signal to 'callers' that we're done.
Services.obs.notifyObservers(null, SEARCH_SERVICE_TOPIC, "init-complete");
- this._recordEngineTelemetry();
gInitialized = true;
} catch (err) {
LOG("Reinit failed: " + err);
@@ -3892,25 +3887,6 @@ SearchService.prototype = {
return result;
},
- _recordEngineTelemetry: function() {
- Services.telemetry.getHistogramById("SEARCH_SERVICE_ENGINE_COUNT")
- .add(Object.keys(this._engines).length);
- let hasUpdates = false;
- let hasIconUpdates = false;
- for (let name in this._engines) {
- let engine = this._engines[name];
- if (engine._hasUpdates) {
- hasUpdates = true;
- if (engine._iconUpdateURL) {
- hasIconUpdates = true;
- break;
- }
- }
- }
- Services.telemetry.getHistogramById("SEARCH_SERVICE_HAS_UPDATES").add(hasUpdates);
- Services.telemetry.getHistogramById("SEARCH_SERVICE_HAS_ICON_UPDATES").add(hasIconUpdates);
- },
-
/**
* This map is built lazily after the available search engines change. It
* allows quick parsing of an URL representing a search submission into the
diff --git a/components/sessionstore/SessionFile.jsm b/components/sessionstore/SessionFile.jsm
index 3c55101..3fa6e2a 100644
--- a/components/sessionstore/SessionFile.jsm
+++ b/components/sessionstore/SessionFile.jsm
@@ -45,8 +45,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "RunState",
"resource:///modules/sessionstore/RunState.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "Task",
"resource://gre/modules/Task.jsm");
-XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
- "@mozilla.org/base/telemetry;1", "nsITelemetry");
XPCOMUtils.defineLazyServiceGetter(this, "sessionStartup",
"@mozilla.org/browser/sessionstartup;1", "nsISessionStartup");
XPCOMUtils.defineLazyModuleGetter(this, "SessionWorker",
@@ -234,10 +232,6 @@ var SessionFileInternal = {
source: source,
parsed: parsed
};
- Telemetry.getHistogramById("FX_SESSION_RESTORE_CORRUPT_FILE").
- add(false);
- Telemetry.getHistogramById("FX_SESSION_RESTORE_READ_FILE_MS").
- add(Date.now() - startMs);
break;
} catch (ex if ex instanceof OS.File.Error && ex.becauseNoSuchFile) {
exists = false;
@@ -253,16 +247,12 @@ var SessionFileInternal = {
} finally {
if (exists) {
noFilesFound = false;
- Telemetry.getHistogramById("FX_SESSION_RESTORE_CORRUPT_FILE").
- add(corrupted);
}
}
}
// All files are corrupted if files found but none could deliver a result.
let allCorrupt = !noFilesFound && !result;
- Telemetry.getHistogramById("FX_SESSION_RESTORE_ALL_FILES_CORRUPT").
- add(allCorrupt);
if (!result) {
// If everything fails, start with an empty session.
@@ -331,7 +321,6 @@ var SessionFileInternal = {
// Wait until the write is done.
promise = promise.then(msg => {
// Record how long the write took.
- this._recordTelemetry(msg.telemetry);
this._successes++;
if (msg.result.upgradeBackup) {
// We have just completed a backup-on-upgrade, store the information
@@ -378,20 +367,4 @@ var SessionFileInternal = {
wipe: function () {
return this._postToWorker("wipe");
},
-
- _recordTelemetry: function(telemetry) {
- for (let id of Object.keys(telemetry)){
- let value = telemetry[id];
- let samples = [];
- if (Array.isArray(value)) {
- samples.push(...value);
- } else {
- samples.push(value);
- }
- let histogram = Telemetry.getHistogramById(id);
- for (let sample of samples) {
- histogram.add(sample);
- }
- }
- }
};
diff --git a/components/sessionstore/SessionStore.jsm b/components/sessionstore/SessionStore.jsm
index 086bb91..1e886b7 100644
--- a/components/sessionstore/SessionStore.jsm
+++ b/components/sessionstore/SessionStore.jsm
@@ -135,7 +135,6 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm", this);
Cu.import("resource://gre/modules/Promise.jsm", this);
Cu.import("resource://gre/modules/Services.jsm", this);
Cu.import("resource://gre/modules/Task.jsm", this);
-Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", this);
Cu.import("resource://gre/modules/Timer.jsm", this);
Cu.import("resource://gre/modules/XPCOMUtils.jsm", this);
Cu.import("resource://gre/modules/debug.js", this);
@@ -145,8 +144,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "gSessionStartup",
"@mozilla.org/browser/sessionstartup;1", "nsISessionStartup");
XPCOMUtils.defineLazyServiceGetter(this, "gScreenManager",
"@mozilla.org/gfx/screenmanager;1", "nsIScreenManager");
-XPCOMUtils.defineLazyServiceGetter(this, "Telemetry",
- "@mozilla.org/base/telemetry;1", "nsITelemetry");
XPCOMUtils.defineLazyModuleGetter(this, "console",
"resource://gre/modules/Console.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "RecentWindow",
@@ -550,7 +547,6 @@ var SessionStoreInternal = {
throw new Error("SessionStore.init() must only be called once!");
}
- TelemetryTimestamps.add("sessionRestoreInitialized");
OBSERVING.forEach(function(aTopic) {
Services.obs.addObserver(this, aTopic, true);
}, this);
@@ -782,9 +778,8 @@ var SessionStoreInternal = {
return;
}
- // Record telemetry measurements done in the child and update the tab's
- // cached state. Mark the window as dirty and trigger a delayed write.
- this.recordTelemetry(aMessage.data.telemetry);
+ // Update the tab's cached state.
+ // Mark the window as dirty and trigger a delayed write.
TabState.update(browser, aMessage.data);
this.saveStateDelayed(win);
@@ -919,18 +914,6 @@ var SessionStoreInternal = {
}
},
- /**
- * Record telemetry measurements stored in an object.
- * @param telemetry
- * {histogramID: value, ...} An object mapping histogramIDs to the
- * value to be recorded for that ID,
- */
- recordTelemetry: function (telemetry) {
- for (let histogramId in telemetry){
- Telemetry.getHistogramById(histogramId).add(telemetry[histogramId]);
- }
- },
-
/* ........ Window Event Handlers .............. */
/**
@@ -1081,7 +1064,6 @@ var SessionStoreInternal = {
// Nothing to restore now, notify observers things are complete.
Services.obs.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
} else {
- TelemetryTimestamps.add("sessionRestoreRestoring");
this._restoreCount = aInitialState.windows ? aInitialState.windows.length : 0;
// global data must be restored before restoreWindow is called so that
@@ -3810,8 +3792,7 @@ var SessionStoreInternal = {
},
/**
- * Update the session start time and send a telemetry measurement
- * for the number of days elapsed since the session was started.
+ * Update the session start time.
*
* @param state
* The session state.
@@ -4437,13 +4418,7 @@ var SessionStoreInternal = {
* Handle an error report from a content process.
*/
reportInternalError(data) {
- // For the moment, we only report errors through Telemetry.
- if (data.telemetry) {
- for (let key of Object.keys(data.telemetry)) {
- let histogram = Telemetry.getHistogramById(key);
- histogram.add(data.telemetry[key]);
- }
- }
+ // STUB, was only reported through Telemetry.
},
/**
diff --git a/components/sessionstore/SessionWorker.js b/components/sessionstore/SessionWorker.js
index 7d802a7..1297a11 100644
--- a/components/sessionstore/SessionWorker.js
+++ b/components/sessionstore/SessionWorker.js
@@ -126,7 +126,6 @@ var Agent = {
*/
write: function (state, options = {}) {
let exn;
- let telemetry = {};
// Cap the number of backward and forward shistory entries on shutdown.
if (options.isFinalWrite) {
@@ -197,9 +196,6 @@ var Agent = {
});
}
- telemetry.FX_SESSION_RESTORE_WRITE_FILE_MS = Date.now() - startWriteMs;
- telemetry.FX_SESSION_RESTORE_FILE_SIZE_BYTES = data.byteLength;
-
} catch (ex) {
// Don't throw immediately
exn = exn || ex;
@@ -276,7 +272,6 @@ var Agent = {
result: {
upgradeBackup: upgradeBackupComplete
},
- telemetry: telemetry,
};
},
diff --git a/components/sessionstore/StartupPerformance.jsm b/components/sessionstore/StartupPerformance.jsm
index d1b77a2..361602b 100644
--- a/components/sessionstore/StartupPerformance.jsm
+++ b/components/sessionstore/StartupPerformance.jsm
@@ -111,18 +111,6 @@ this.StartupPerformance = {
return;
}
- // Once we are done restoring tabs, update Telemetry.
- let histogramName = isAutoRestore ?
- "FX_SESSION_RESTORE_AUTO_RESTORE_DURATION_UNTIL_EAGER_TABS_RESTORED_MS" :
- "FX_SESSION_RESTORE_MANUAL_RESTORE_DURATION_UNTIL_EAGER_TABS_RESTORED_MS";
- let histogram = Services.telemetry.getHistogramById(histogramName);
- let delta = this._latestRestoredTimeStamp - this._startTimeStamp;
- histogram.add(delta);
-
- Services.telemetry.getHistogramById("FX_SESSION_RESTORE_NUMBER_OF_EAGER_TABS_RESTORED").add(this._totalNumberOfEagerTabs);
- Services.telemetry.getHistogramById("FX_SESSION_RESTORE_NUMBER_OF_TABS_RESTORED").add(this._totalNumberOfTabs);
- Services.telemetry.getHistogramById("FX_SESSION_RESTORE_NUMBER_OF_WINDOWS_RESTORED").add(this._totalNumberOfWindows);
-
// Reset
this._startTimeStamp = null;
} catch (ex) {
diff --git a/components/sessionstore/content/content-sessionStore.js b/components/sessionstore/content/content-sessionStore.js
index 858e357..8af3350 100644
--- a/components/sessionstore/content/content-sessionStore.js
+++ b/components/sessionstore/content/content-sessionStore.js
@@ -628,7 +628,6 @@ var SessionStorageListener = {
let size = this.estimateStorageSize(collected);
- MessageQueue.push("telemetry", () => ({ FX_SESSION_RESTORE_DOM_STORAGE_SIZE_ESTIMATE_CHARS: size }));
if (size > Preferences.get("browser.sessionstore.dom_storage_limit", DOM_STORAGE_MAX_CHARS)) {
// Rather than keeping the old storage, which wouldn't match the rest
// of the state of the page, empty the storage. DOM storage will be
@@ -800,37 +799,23 @@ var MessageQueue = {
let durationMs = Date.now();
let data = {};
- let telemetry = {};
for (let [key, func] of this._data) {
let value = func();
- if (key == "telemetry") {
- for (let histogramId of Object.keys(value)) {
- telemetry[histogramId] = value[histogramId];
- }
- } else if (value || (key != "storagechange" && key != "historychange")) {
+ if (value || (key != "storagechange" && key != "historychange")) {
data[key] = value;
}
}
this._data.clear();
- durationMs = Date.now() - durationMs;
- telemetry.FX_SESSION_RESTORE_CONTENT_COLLECT_DATA_LONGEST_OP_MS = durationMs;
-
try {
// Send all data to the parent process.
sendAsyncMessage("SessionStore:update", {
- data, telemetry, flushID,
+ data, flushID,
isFinal: options.isFinal || false,
epoch: gCurrentEpoch
});
} catch (ex if ex && ex.result == Cr.NS_ERROR_OUT_OF_MEMORY) {
- let telemetry = {
- FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM: 1
- };
- sendAsyncMessage("SessionStore:error", {
- telemetry
- });
}
},
};
diff --git a/components/sessionstore/nsSessionStartup.js b/components/sessionstore/nsSessionStartup.js
index 9cda155..c7bb338 100644
--- a/components/sessionstore/nsSessionStartup.js
+++ b/components/sessionstore/nsSessionStartup.js
@@ -203,11 +203,6 @@ SessionStartup.prototype = {
}
}
- // Report shutdown success via telemetry. Shortcoming here are
- // being-killed-by-OS-shutdown-logic, shutdown freezing after
- // session restore was written, etc.
- Services.telemetry.getHistogramById("SHUTDOWN_OK").add(!this._previousSessionCrashed);
-
// set the startup type
if (this._previousSessionCrashed && resumeFromCrash)
this._sessionType = Ci.nsISessionStartup.RECOVER_SESSION;