Backed out changeset 4a271b44cbfe (bug 810146). r=bustageahoy

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2013-01-28 15:14:28 -05:00
parent 1a99621b68
commit d30eedd7b3
4 changed files with 3 additions and 73 deletions

View File

@ -121,11 +121,6 @@ function getSimpleMeasurements() {
Cu.import("resource:///modules/TelemetryTimestamps.jsm", o);
appTimestamps = o.TelemetryTimestamps.get();
} catch (ex) {}
try {
let o = {};
Cu.import("resource://gre/modules/AddonManager.jsm", o);
ret.addonManager = o.AddonManagerPrivate.getSimpleMeasures();
} catch (ex) {}
if (si.process) {
for each (let field in Object.keys(si)) {

View File

@ -764,9 +764,7 @@ function sortStartupMilestones(aSimpleMeasurements) {
["start", "main", "startupCrashDetectionBegin", "createTopLevelWindow",
"firstPaint", "delayedStartupStarted", "firstLoadURI",
"sessionRestoreInitialized", "sessionRestoreRestoring", "sessionRestored",
"delayedStartupFinished", "startupCrashDetectionEnd",
"AMI_startup_begin", "AMI_startup_end", "XPI_startup_begin", "XPI_startup_end",
"XPI_bootstrap_addons_begin", "XPI_bootstrap_addons_end"];
"delayedStartupFinished", "startupCrashDetectionEnd"];
let sortedKeys = Object.keys(aSimpleMeasurements);

View File

@ -7,7 +7,6 @@
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
const PREF_BLOCKLIST_PINGCOUNTVERSION = "extensions.blocklist.pingCountVersion";
const PREF_EM_UPDATE_ENABLED = "extensions.update.enabled";
@ -437,10 +436,6 @@ var AddonManagerInternal = {
}
}),
recordTimestamp: function AMI_recordTimestamp(name, value) {
this.TelemetryTimestamps.add(name, value);
},
/**
* Initializes the AddonManager, loading any known providers and initializing
* them.
@ -449,8 +444,6 @@ var AddonManagerInternal = {
if (gStarted)
return;
this.recordTimestamp("AMI_startup_begin");
Services.obs.addObserver(this, "xpcom-shutdown", false);
let appChanged = undefined;
@ -558,7 +551,6 @@ var AddonManagerInternal = {
}
gStartupComplete = true;
this.recordTimestamp("AMI_startup_end");
},
/**
@ -2087,20 +2079,7 @@ this.AddonManagerPrivate = {
AddonCompatibilityOverride: AddonCompatibilityOverride,
AddonType: AddonType,
recordTimestamp: function AMP_recordTimestamp(name, value) {
AddonManagerInternal.recordTimestamp(name, value);
},
_simpleMeasures: {},
recordSimpleMeasure: function AMP_recordSimpleMeasure(name, value) {
this._simpleMeasures[name] = value;
},
getSimpleMeasures: function AMP_getSimpleMeasures() {
return this._simpleMeasures;
}
AddonType: AddonType
};
/**
@ -2447,8 +2426,6 @@ this.AddonManager = {
}
};
// load the timestamps module into AddonManagerInternal
Cu.import("resource:///modules/TelemetryTimestamps.jsm", AddonManagerInternal);
Object.freeze(AddonManagerInternal);
Object.freeze(AddonManagerPrivate);
Object.freeze(AddonManager);

View File

@ -1503,8 +1503,6 @@ var XPIProvider = {
enabledAddons: null,
// An array of add-on IDs of add-ons that were inactive during startup
inactiveAddonIDs: [],
// Count of unpacked add-ons
unpackedAddons: 0,
/**
* Starts the XPI provider initializes the install locations and prefs.
@ -1528,8 +1526,6 @@ var XPIProvider = {
this.installLocations = [];
this.installLocationsByName = {};
AddonManagerPrivate.recordTimestamp("XPI_startup_begin");
function addDirectoryInstallLocation(aName, aKey, aPaths, aScope, aLocked) {
try {
var dir = FileUtils.getDir(aKey, aPaths);
@ -1667,7 +1663,6 @@ var XPIProvider = {
this.addAddonsToCrashReporter();
}
AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin");
for (let id in this.bootstrappedAddons) {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
file.persistentDescriptor = this.bootstrappedAddons[id].descriptor;
@ -1675,7 +1670,6 @@ var XPIProvider = {
this.bootstrappedAddons[id].type, file,
"startup", BOOTSTRAP_REASONS.APP_STARTUP);
}
AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_end");
// Let these shutdown a little earlier when they still have access to most
// of XPCOM
@ -1694,8 +1688,6 @@ var XPIProvider = {
}
}, "quit-application-granted", false);
AddonManagerPrivate.recordTimestamp("XPI_startup_end");
this.extensionsActive = true;
},
@ -1836,15 +1828,7 @@ var XPIProvider = {
descriptor: file.persistentDescriptor,
mtime: recursiveLastModifiedTime(file)
};
try {
// get the install.rdf update time, if any
file.append(FILE_INSTALL_MANIFEST);
let rdfTime = file.lastModifiedTime;
addonStates[id].rdfTime = rdfTime;
this.unpackedAddons += 1;
}
catch (e) { }
}, this);
});
return addonStates;
},
@ -1860,7 +1844,6 @@ var XPIProvider = {
*/
getInstallLocationStates: function XPI_getInstallLocationStates() {
let states = [];
this.unpackedAddons = 0;
this.installLocations.forEach(function(aLocation) {
let addons = aLocation.addonLocations;
if (addons.length == 0)
@ -2825,11 +2808,6 @@ var XPIProvider = {
let changed = false;
let knownLocations = XPIDatabase.getInstallLocations();
// Gather stats for addon telemetry
let modifiedUnpacked = 0;
let modifiedExManifest = 0;
let modifiedXPI = 0;
// The install locations are iterated in reverse order of priority so when
// there are multiple add-ons installed with the same ID the one that
// should be visible is the first one encountered.
@ -2865,17 +2843,6 @@ var XPIProvider = {
if (aOldAddon.visible && !aOldAddon.active)
XPIProvider.inactiveAddonIDs.push(aOldAddon.id);
// Check if the add-on is unpacked, and has had other files changed
// on disk without the install.rdf manifest being changed
if ((addonState.rdfTime) && (aOldAddon.updateDate != addonState.mtime)) {
modifiedUnpacked += 1;
if (aOldAddon.updateDate >= addonState.rdfTime)
modifiedExManifest += 1;
}
else if (aOldAddon.updateDate != addonState.mtime) {
modifiedXPI += 1;
}
// The add-on has changed if the modification time has changed, or
// we have an updated manifest for it. Also reload the metadata for
// add-ons in the application directory when the application version
@ -2927,12 +2894,6 @@ var XPIProvider = {
}, this);
}, this);
// Tell Telemetry what we found
AddonManagerPrivate.recordSimpleMeasure("modifiedUnpacked", modifiedUnpacked);
if (modifiedUnpacked > 0)
AddonManagerPrivate.recordSimpleMeasure("modifiedExceptInstallRDF", modifiedExManifest);
AddonManagerPrivate.recordSimpleMeasure("modifiedXPI", modifiedXPI);
// Cache the new install location states
let cache = JSON.stringify(this.getInstallLocationStates());
Services.prefs.setCharPref(PREF_INSTALL_CACHE, cache);
@ -3088,7 +3049,6 @@ var XPIProvider = {
ERROR("Error processing file changes", e);
}
}
AddonManagerPrivate.recordSimpleMeasure("installedUnpacked", this.unpackedAddons);
if (aAppChanged) {
// When upgrading the app and using a custom skin make sure it is still