mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-27 09:37:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
cf4e046f90
4 changed files with 1 additions and 175 deletions
|
|
@ -28,9 +28,6 @@ var TrackingProtection = {
|
||||||
gNavigatorBundle.getString("trackingProtection.icon.activeTooltip");
|
gNavigatorBundle.getString("trackingProtection.icon.activeTooltip");
|
||||||
this.disabledTooltipText =
|
this.disabledTooltipText =
|
||||||
gNavigatorBundle.getString("trackingProtection.icon.disabledTooltip");
|
gNavigatorBundle.getString("trackingProtection.icon.disabledTooltip");
|
||||||
|
|
||||||
this.enabledHistogramAdd(this.enabledGlobally);
|
|
||||||
this.disabledPBMHistogramAdd(!this.enabledInPrivateWindows);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
uninit() {
|
uninit() {
|
||||||
|
|
@ -56,34 +53,6 @@ var TrackingProtection = {
|
||||||
this.container.hidden = !this.enabled;
|
this.container.hidden = !this.enabled;
|
||||||
},
|
},
|
||||||
|
|
||||||
enabledHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_ENABLED").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
disabledPBMHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_PBM_DISABLED").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
eventsHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_EVENTS").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
shieldHistogramAdd(value) {
|
|
||||||
if (PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Services.telemetry.getHistogramById("TRACKING_PROTECTION_SHIELD").add(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
onSecurityChange(state, isSimulated) {
|
onSecurityChange(state, isSimulated) {
|
||||||
if (!this.enabled) {
|
if (!this.enabled) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -104,25 +73,15 @@ var TrackingProtection = {
|
||||||
this.icon.setAttribute("tooltiptext", this.activeTooltipText);
|
this.icon.setAttribute("tooltiptext", this.activeTooltipText);
|
||||||
this.icon.setAttribute("state", "blocked-tracking-content");
|
this.icon.setAttribute("state", "blocked-tracking-content");
|
||||||
this.content.setAttribute("state", "blocked-tracking-content");
|
this.content.setAttribute("state", "blocked-tracking-content");
|
||||||
|
|
||||||
this.shieldHistogramAdd(2);
|
|
||||||
} else if (isAllowing) {
|
} else if (isAllowing) {
|
||||||
this.icon.setAttribute("tooltiptext", this.disabledTooltipText);
|
this.icon.setAttribute("tooltiptext", this.disabledTooltipText);
|
||||||
this.icon.setAttribute("state", "loaded-tracking-content");
|
this.icon.setAttribute("state", "loaded-tracking-content");
|
||||||
this.content.setAttribute("state", "loaded-tracking-content");
|
this.content.setAttribute("state", "loaded-tracking-content");
|
||||||
|
|
||||||
this.shieldHistogramAdd(1);
|
|
||||||
} else {
|
} else {
|
||||||
this.icon.removeAttribute("tooltiptext");
|
this.icon.removeAttribute("tooltiptext");
|
||||||
this.icon.removeAttribute("state");
|
this.icon.removeAttribute("state");
|
||||||
this.content.removeAttribute("state");
|
this.content.removeAttribute("state");
|
||||||
|
|
||||||
// We didn't show the shield
|
|
||||||
this.shieldHistogramAdd(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for state change.
|
|
||||||
this.eventsHistogramAdd(0);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
disableForCurrentPage() {
|
disableForCurrentPage() {
|
||||||
|
|
@ -143,9 +102,6 @@ var TrackingProtection = {
|
||||||
"trackingprotection", Services.perms.ALLOW_ACTION);
|
"trackingprotection", Services.perms.ALLOW_ACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for disable protection.
|
|
||||||
this.eventsHistogramAdd(1);
|
|
||||||
|
|
||||||
// Hide the control center.
|
// Hide the control center.
|
||||||
document.getElementById("identity-popup").hidePopup();
|
document.getElementById("identity-popup").hidePopup();
|
||||||
|
|
||||||
|
|
@ -166,9 +122,6 @@ var TrackingProtection = {
|
||||||
Services.perms.remove(normalizedUrl, "trackingprotection");
|
Services.perms.remove(normalizedUrl, "trackingprotection");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry for enable protection.
|
|
||||||
this.eventsHistogramAdd(2);
|
|
||||||
|
|
||||||
// Hide the control center.
|
// Hide the control center.
|
||||||
document.getElementById("identity-popup").hidePopup();
|
document.getElementById("identity-popup").hidePopup();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -685,14 +685,8 @@ var AddonManagerInternal = {
|
||||||
providerShutdowns: new Map(),
|
providerShutdowns: new Map(),
|
||||||
types: {},
|
types: {},
|
||||||
startupChanges: {},
|
startupChanges: {},
|
||||||
// Store telemetry details per addon provider
|
|
||||||
telemetryDetails: {},
|
|
||||||
upgradeListeners: new Map(),
|
upgradeListeners: new Map(),
|
||||||
|
|
||||||
recordTimestamp: function(name, value) {
|
|
||||||
this.TelemetryTimestamps.add(name, value);
|
|
||||||
},
|
|
||||||
|
|
||||||
validateBlocklist: function() {
|
validateBlocklist: function() {
|
||||||
let appBlocklist = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
|
let appBlocklist = FileUtils.getFile(KEY_APPDIR, [FILE_BLOCKLIST]);
|
||||||
|
|
||||||
|
|
@ -833,12 +827,6 @@ var AddonManagerInternal = {
|
||||||
if (gStarted)
|
if (gStarted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.recordTimestamp("AMI_startup_begin");
|
|
||||||
|
|
||||||
// clear this for xpcshell test restarts
|
|
||||||
for (let provider in this.telemetryDetails)
|
|
||||||
delete this.telemetryDetails[provider];
|
|
||||||
|
|
||||||
let appChanged = undefined;
|
let appChanged = undefined;
|
||||||
|
|
||||||
let oldAppVersion = null;
|
let oldAppVersion = null;
|
||||||
|
|
@ -982,7 +970,6 @@ var AddonManagerInternal = {
|
||||||
gPluginPageListener.addMessageListener("RequestPlugins", this.requestPlugins);
|
gPluginPageListener.addMessageListener("RequestPlugins", this.requestPlugins);
|
||||||
|
|
||||||
gStartupComplete = true;
|
gStartupComplete = true;
|
||||||
this.recordTimestamp("AMI_startup_end");
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
logger.error("startup failed", e);
|
logger.error("startup failed", e);
|
||||||
|
|
@ -3092,10 +3079,6 @@ this.AddonManagerPrivate = {
|
||||||
|
|
||||||
AddonType: AddonType,
|
AddonType: AddonType,
|
||||||
|
|
||||||
recordTimestamp: function(name, value) {
|
|
||||||
AddonManagerInternal.recordTimestamp(name, value);
|
|
||||||
},
|
|
||||||
|
|
||||||
_simpleMeasures: {},
|
_simpleMeasures: {},
|
||||||
recordSimpleMeasure: function(name, value) {
|
recordSimpleMeasure: function(name, value) {
|
||||||
this._simpleMeasures[name] = value;
|
this._simpleMeasures[name] = value;
|
||||||
|
|
@ -3125,14 +3108,6 @@ this.AddonManagerPrivate = {
|
||||||
return this._simpleMeasures;
|
return this._simpleMeasures;
|
||||||
},
|
},
|
||||||
|
|
||||||
getTelemetryDetails: function() {
|
|
||||||
return AddonManagerInternal.telemetryDetails;
|
|
||||||
},
|
|
||||||
|
|
||||||
setTelemetryDetails: function(aProvider, aDetails) {
|
|
||||||
AddonManagerInternal.telemetryDetails[aProvider] = aDetails;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Start a timer, record a simple measure of the time interval when
|
// Start a timer, record a simple measure of the time interval when
|
||||||
// timer.done() is called
|
// timer.done() is called
|
||||||
simpleTimer: function(aName) {
|
simpleTimer: function(aName) {
|
||||||
|
|
@ -3660,7 +3635,6 @@ this.AddonManager = {
|
||||||
this.AddonManager.init();
|
this.AddonManager.init();
|
||||||
|
|
||||||
// load the timestamps module into AddonManagerInternal
|
// load the timestamps module into AddonManagerInternal
|
||||||
Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", AddonManagerInternal);
|
|
||||||
Object.freeze(AddonManagerInternal);
|
Object.freeze(AddonManagerInternal);
|
||||||
Object.freeze(AddonManagerPrivate);
|
Object.freeze(AddonManagerPrivate);
|
||||||
Object.freeze(AddonManager);
|
Object.freeze(AddonManager);
|
||||||
|
|
|
||||||
|
|
@ -268,14 +268,6 @@ function mustSign(aType) {
|
||||||
return REQUIRE_SIGNING || Preferences.get(PREF_XPI_SIGNATURES_REQUIRED, false);
|
return REQUIRE_SIGNING || Preferences.get(PREF_XPI_SIGNATURES_REQUIRED, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep track of where we are in startup for telemetry
|
|
||||||
// event happened during XPIDatabase.startup()
|
|
||||||
const XPI_STARTING = "XPIStarting";
|
|
||||||
// event happened after startup() but before the final-ui-startup event
|
|
||||||
const XPI_BEFORE_UI_STARTUP = "BeforeFinalUIStartup";
|
|
||||||
// event happened after final-ui-startup
|
|
||||||
const XPI_AFTER_UI_STARTUP = "AfterFinalUIStartup";
|
|
||||||
|
|
||||||
const COMPATIBLE_BY_DEFAULT_TYPES = {
|
const COMPATIBLE_BY_DEFAULT_TYPES = {
|
||||||
extension: true,
|
extension: true,
|
||||||
dictionary: true
|
dictionary: true
|
||||||
|
|
@ -320,7 +312,6 @@ function loadLazyObjects() {
|
||||||
XPIStates,
|
XPIStates,
|
||||||
syncLoadManifestFromFile,
|
syncLoadManifestFromFile,
|
||||||
isUsableAddon,
|
isUsableAddon,
|
||||||
recordAddonTelemetry,
|
|
||||||
applyBlocklistChanges,
|
applyBlocklistChanges,
|
||||||
flushChromeCaches,
|
flushChromeCaches,
|
||||||
canRunInSafeMode,
|
canRunInSafeMode,
|
||||||
|
|
@ -2041,20 +2032,6 @@ function getDirectoryEntries(aDir, aSortEntries) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Record a bit of per-addon telemetry
|
|
||||||
* @param aAddon the addon to record
|
|
||||||
*/
|
|
||||||
function recordAddonTelemetry(aAddon) {
|
|
||||||
let locale = aAddon.defaultLocale;
|
|
||||||
if (locale) {
|
|
||||||
if (locale.name)
|
|
||||||
XPIProvider.setTelemetry(aAddon.id, "name", locale.name);
|
|
||||||
if (locale.creator)
|
|
||||||
XPIProvider.setTelemetry(aAddon.id, "creator", locale.creator);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The on-disk state of an individual XPI, created from an Object
|
* The on-disk state of an individual XPI, created from an Object
|
||||||
* as stored in the 'extensions.xpiState' pref.
|
* as stored in the 'extensions.xpiState' pref.
|
||||||
|
|
@ -2106,8 +2083,6 @@ XPIState.prototype = {
|
||||||
if (!('scanTime' in this) || this.enabled) {
|
if (!('scanTime' in this) || this.enabled) {
|
||||||
logger.debug('getModTime: Recursive scan of ' + aId);
|
logger.debug('getModTime: Recursive scan of ' + aId);
|
||||||
let [modFile, modTime, items] = recursiveLastModifiedTime(aFile);
|
let [modFile, modTime, items] = recursiveLastModifiedTime(aFile);
|
||||||
XPIProvider._mostRecentlyModifiedFile[aId] = modFile;
|
|
||||||
XPIProvider.setTelemetry(aId, "scan_items", items);
|
|
||||||
if (modTime != this.scanTime) {
|
if (modTime != this.scanTime) {
|
||||||
this.scanTime = modTime;
|
this.scanTime = modTime;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
@ -2119,9 +2094,6 @@ XPIState.prototype = {
|
||||||
try {
|
try {
|
||||||
// Get the install manifest update time, if any.
|
// Get the install manifest update time, if any.
|
||||||
let maniFile = getManifestFileForDir(aFile);
|
let maniFile = getManifestFileForDir(aFile);
|
||||||
if (!(aId in XPIProvider._mostRecentlyModifiedFile)) {
|
|
||||||
XPIProvider._mostRecentlyModifiedFile[aId] = maniFile.leafName;
|
|
||||||
}
|
|
||||||
let maniTime = maniFile.lastModifiedTime;
|
let maniTime = maniFile.lastModifiedTime;
|
||||||
if (maniTime != this.manifestTime) {
|
if (maniTime != this.manifestTime) {
|
||||||
this.manifestTime = maniTime;
|
this.manifestTime = maniTime;
|
||||||
|
|
@ -2142,9 +2114,6 @@ XPIState.prototype = {
|
||||||
this.scanTime = 0;
|
this.scanTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Record duration of file-modified check
|
|
||||||
XPIProvider.setTelemetry(aId, "scan_MS", Math.round(Cu.now() - scanStarted));
|
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -2277,7 +2246,6 @@ this.XPIStates = {
|
||||||
}
|
}
|
||||||
foundAddons.set(id, xpiState);
|
foundAddons.set(id, xpiState);
|
||||||
}
|
}
|
||||||
XPIProvider.setTelemetry(id, "location", location.name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Anything left behind in oldState was removed from the file system.
|
// Anything left behind in oldState was removed from the file system.
|
||||||
|
|
@ -2360,7 +2328,6 @@ this.XPIStates = {
|
||||||
let xpiState = new XPIState({d: aAddon.descriptor});
|
let xpiState = new XPIState({d: aAddon.descriptor});
|
||||||
location.set(aAddon.id, xpiState);
|
location.set(aAddon.id, xpiState);
|
||||||
xpiState.syncWithDB(aAddon, true);
|
xpiState.syncWithDB(aAddon, true);
|
||||||
XPIProvider.setTelemetry(aAddon.id, "location", aAddon.location);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2425,13 +2392,6 @@ this.XPIProvider = {
|
||||||
allAppGlobal: true,
|
allAppGlobal: true,
|
||||||
// A string listing the enabled add-ons for annotating crash reports
|
// A string listing the enabled add-ons for annotating crash reports
|
||||||
enabledAddons: null,
|
enabledAddons: null,
|
||||||
// Keep track of startup phases for telemetry
|
|
||||||
runPhase: XPI_STARTING,
|
|
||||||
// Keep track of the newest file in each add-on, in case we want to
|
|
||||||
// report it to telemetry.
|
|
||||||
_mostRecentlyModifiedFile: {},
|
|
||||||
// Per-addon telemetry information
|
|
||||||
_telemetryDetails: {},
|
|
||||||
// A Map from an add-on install to its ID
|
// A Map from an add-on install to its ID
|
||||||
_addonFileMap: new Map(),
|
_addonFileMap: new Map(),
|
||||||
// Flag to know if ToolboxProcess.jsm has already been loaded by someone or not
|
// Flag to know if ToolboxProcess.jsm has already been loaded by someone or not
|
||||||
|
|
@ -2478,15 +2438,6 @@ this.XPIProvider = {
|
||||||
return Array.from(res, id => addons[id]);
|
return Array.from(res, id => addons[id]);
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
|
||||||
* Set a value in the telemetry hash for a given ID
|
|
||||||
*/
|
|
||||||
setTelemetry: function(aId, aName, aValue) {
|
|
||||||
if (!this._telemetryDetails[aId])
|
|
||||||
this._telemetryDetails[aId] = {};
|
|
||||||
this._telemetryDetails[aId][aName] = aValue;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Keep track of in-progress operations that support cancel()
|
// Keep track of in-progress operations that support cancel()
|
||||||
_inProgress: [],
|
_inProgress: [],
|
||||||
|
|
||||||
|
|
@ -2668,19 +2619,12 @@ this.XPIProvider = {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
AddonManagerPrivate.recordTimestamp("XPI_startup_begin");
|
|
||||||
|
|
||||||
logger.debug("startup");
|
logger.debug("startup");
|
||||||
this.runPhase = XPI_STARTING;
|
|
||||||
this.installs = new Set();
|
this.installs = new Set();
|
||||||
this.installLocations = [];
|
this.installLocations = [];
|
||||||
this.installLocationsByName = {};
|
this.installLocationsByName = {};
|
||||||
// Hook for tests to detect when saving database at shutdown time fails
|
// Hook for tests to detect when saving database at shutdown time fails
|
||||||
this._shutdownError = null;
|
this._shutdownError = null;
|
||||||
// Clear this at startup for xpcshell test restarts
|
|
||||||
this._telemetryDetails = {};
|
|
||||||
// Register our details structure with AddonManager
|
|
||||||
AddonManagerPrivate.setTelemetryDetails("XPI", this._telemetryDetails);
|
|
||||||
|
|
||||||
let hasRegistry = ("nsIWindowsRegKey" in Ci);
|
let hasRegistry = ("nsIWindowsRegKey" in Ci);
|
||||||
|
|
||||||
|
|
@ -2813,8 +2757,6 @@ this.XPIProvider = {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_begin");
|
|
||||||
|
|
||||||
for (let addon of this.sortBootstrappedAddons()) {
|
for (let addon of this.sortBootstrappedAddons()) {
|
||||||
try {
|
try {
|
||||||
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
||||||
|
|
@ -2833,7 +2775,6 @@ this.XPIProvider = {
|
||||||
addon.descriptor, e);
|
addon.descriptor, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AddonManagerPrivate.recordTimestamp("XPI_bootstrap_addons_end");
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
logger.error("bootstrap startup failed", e);
|
logger.error("bootstrap startup failed", e);
|
||||||
|
|
@ -2872,19 +2813,7 @@ this.XPIProvider = {
|
||||||
}
|
}
|
||||||
}, "quit-application-granted", false);
|
}, "quit-application-granted", false);
|
||||||
|
|
||||||
// Detect final-ui-startup for telemetry reporting
|
|
||||||
Services.obs.addObserver({
|
|
||||||
observe: function(aSubject, aTopic, aData) {
|
|
||||||
AddonManagerPrivate.recordTimestamp("XPI_finalUIStartup");
|
|
||||||
XPIProvider.runPhase = XPI_AFTER_UI_STARTUP;
|
|
||||||
Services.obs.removeObserver(this, "final-ui-startup");
|
|
||||||
}
|
|
||||||
}, "final-ui-startup", false);
|
|
||||||
|
|
||||||
AddonManagerPrivate.recordTimestamp("XPI_startup_end");
|
|
||||||
|
|
||||||
this.extensionsActive = true;
|
this.extensionsActive = true;
|
||||||
this.runPhase = XPI_BEFORE_UI_STARTUP;
|
|
||||||
|
|
||||||
let timerManager = Cc["@mozilla.org/updates/timer-manager;1"].
|
let timerManager = Cc["@mozilla.org/updates/timer-manager;1"].
|
||||||
getService(Ci.nsIUpdateTimerManager);
|
getService(Ci.nsIUpdateTimerManager);
|
||||||
|
|
@ -3023,7 +2952,6 @@ this.XPIProvider = {
|
||||||
*/
|
*/
|
||||||
showUpgradeUI: function(aAddonIDs) {
|
showUpgradeUI: function(aAddonIDs) {
|
||||||
logger.debug("XPI_showUpgradeUI: " + aAddonIDs.toSource());
|
logger.debug("XPI_showUpgradeUI: " + aAddonIDs.toSource());
|
||||||
Services.telemetry.getHistogramById("ADDON_MANAGER_UPGRADE_UI_SHOWN").add(1);
|
|
||||||
|
|
||||||
// Flip a flag to indicate that we interrupted startup with an interactive prompt
|
// Flip a flag to indicate that we interrupted startup with an interactive prompt
|
||||||
Services.startup.interrupted = true;
|
Services.startup.interrupted = true;
|
||||||
|
|
@ -3259,10 +3187,6 @@ this.XPIProvider = {
|
||||||
Services.appinfo.annotateCrashReport("Add-ons", data);
|
Services.appinfo.annotateCrashReport("Add-ons", data);
|
||||||
}
|
}
|
||||||
catch (e) { }
|
catch (e) { }
|
||||||
|
|
||||||
let TelemetrySession =
|
|
||||||
Cu.import("resource://gre/modules/TelemetrySession.jsm", {}).TelemetrySession;
|
|
||||||
TelemetrySession.setAddOns(data);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3707,11 +3631,7 @@ this.XPIProvider = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Telemetry probe added around getInstallState() to check perf
|
|
||||||
let telemetryCaptureTime = Cu.now();
|
|
||||||
let installChanged = XPIStates.getInstallState();
|
let installChanged = XPIStates.getInstallState();
|
||||||
let telemetry = Services.telemetry;
|
|
||||||
telemetry.getHistogramById("CHECK_ADDONS_MODIFIED_MS").add(Math.round(Cu.now() - telemetryCaptureTime));
|
|
||||||
if (installChanged) {
|
if (installChanged) {
|
||||||
updateReasons.push("directoryState");
|
updateReasons.push("directoryState");
|
||||||
}
|
}
|
||||||
|
|
@ -4861,7 +4781,6 @@ this.XPIProvider = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setTelemetry(aAddon.id, aMethod + "_MS", new Date() - timeStart);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -5806,8 +5725,6 @@ class AddonInstall {
|
||||||
XPIProvider.unloadBootstrapScope(this.addon.id);
|
XPIProvider.unloadBootstrapScope(this.addon.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XPIProvider.setTelemetry(this.addon.id, "unpacked", installedUnpacked);
|
|
||||||
recordAddonTelemetry(this.addon);
|
|
||||||
}
|
}
|
||||||
}).bind(this)).then(null, (e) => {
|
}).bind(this)).then(null, (e) => {
|
||||||
logger.warn(`Failed to install ${this.file.path} from ${this.sourceURI.spec} to ${stagedAddon.path}`, e);
|
logger.warn(`Failed to install ${this.file.path} from ${this.sourceURI.spec} to ${stagedAddon.path}`, e);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
// These are injected from XPIProvider.jsm
|
// These are injected from XPIProvider.jsm
|
||||||
/* globals ADDON_SIGNING, SIGNED_TYPES, BOOTSTRAP_REASONS, DB_SCHEMA,
|
/* globals ADDON_SIGNING, SIGNED_TYPES, BOOTSTRAP_REASONS, DB_SCHEMA,
|
||||||
AddonInternal, XPIProvider, XPIStates, syncLoadManifestFromFile,
|
AddonInternal, XPIProvider, XPIStates, syncLoadManifestFromFile,
|
||||||
isUsableAddon, recordAddonTelemetry, applyBlocklistChanges,
|
isUsableAddon, applyBlocklistChanges,
|
||||||
flushChromeCaches, canRunInSafeMode*/
|
flushChromeCaches, canRunInSafeMode*/
|
||||||
|
|
||||||
var Cc = Components.classes;
|
var Cc = Components.classes;
|
||||||
|
|
@ -1962,24 +1962,6 @@ this.XPIDatabaseReconcile = {
|
||||||
// Check if the add-on is still installed
|
// Check if the add-on is still installed
|
||||||
let xpiState = states && states.get(id);
|
let xpiState = states && states.get(id);
|
||||||
if (xpiState) {
|
if (xpiState) {
|
||||||
// Here the add-on was present in the database and on disk
|
|
||||||
recordAddonTelemetry(oldAddon);
|
|
||||||
|
|
||||||
// Check if the add-on has been changed outside the XPI provider
|
|
||||||
if (oldAddon.updateDate != xpiState.mtime) {
|
|
||||||
// Did time change in the wrong direction?
|
|
||||||
if (xpiState.mtime < oldAddon.updateDate) {
|
|
||||||
XPIProvider.setTelemetry(oldAddon.id, "olderFile", {
|
|
||||||
name: XPIProvider._mostRecentlyModifiedFile[id],
|
|
||||||
mtime: xpiState.mtime,
|
|
||||||
oldtime: oldAddon.updateDate
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
XPIProvider.setTelemetry(oldAddon.id, "modifiedFile",
|
|
||||||
XPIProvider._mostRecentlyModifiedFile[id]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The add-on has changed if the modification time has changed, if
|
// The add-on has changed if the modification time has changed, if
|
||||||
// we have an updated manifest for it, or if the schema version has
|
// we have an updated manifest for it, or if the schema version has
|
||||||
// changed.
|
// changed.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue