summaryrefslogtreecommitdiffstats
path: root/toolkit/components/telemetry/app
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /toolkit/components/telemetry/app
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/telemetry/app')
-rw-r--r--toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs21
-rw-r--r--toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs7
2 files changed, 28 insertions, 0 deletions
diff --git a/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs b/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs
index b9f8d5f85a..9a15142349 100644
--- a/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs
+++ b/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs
@@ -256,6 +256,15 @@ export var TelemetryController = Object.freeze({
promiseInitialized() {
return Impl.promiseInitialized();
},
+
+ /**
+ * Allows to trigger TelemetryControllers delayed initialization now and waiting for its completion.
+ * The returned promise is guaranteed to resolve before TelemetryController is shutting down.
+ * @return {Promise} Resolved when delayed TelemetryController initialization completed.
+ */
+ ensureInitialized() {
+ return Impl.ensureInitialized();
+ },
});
var Impl = {
@@ -1158,6 +1167,18 @@ var Impl = {
return this._delayedInitTaskDeferred.promise;
},
+ /**
+ * Allows to trigger TelemetryControllers delayed initialization now and waiting for its completion.
+ * This will complete before TelemetryController is shutting down.
+ * @return {Promise} Resolved when delayed TelemetryController initialization completed.
+ */
+ ensureInitialized() {
+ if (this._delayedInitTask) {
+ return this._delayedInitTask.finalize();
+ }
+ return Promise.resolve();
+ },
+
getCurrentPingData(aSubsession) {
this._log.trace("getCurrentPingData - subsession: " + aSubsession);
diff --git a/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs b/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs
index 18d46a3565..5b917293c1 100644
--- a/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs
+++ b/toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs
@@ -895,6 +895,8 @@ EnvironmentAddonBuilder.prototype = {
hasBinaryComponents: false,
installDay: Utils.millisecondsToDays(installDate.getTime()),
updateDay: Utils.millisecondsToDays(updateDate.getTime()),
+ signedState: theme.signedState,
+ signedTypes: JSON.stringify(theme.signedTypes),
};
}
@@ -1672,6 +1674,7 @@ EnvironmentCache.prototype = {
let creationDate = await profileAccessor.created;
let resetDate = await profileAccessor.reset;
let firstUseDate = await profileAccessor.firstUse;
+ let recoveredFromBackup = await profileAccessor.recoveredFromBackup;
this._currentEnvironment.profile.creationDate =
Utils.millisecondsToDays(creationDate);
@@ -1683,6 +1686,10 @@ EnvironmentCache.prototype = {
this._currentEnvironment.profile.firstUseDate =
Utils.millisecondsToDays(firstUseDate);
}
+ if (recoveredFromBackup) {
+ this._currentEnvironment.profile.recoveredFromBackup =
+ Utils.millisecondsToDays(recoveredFromBackup);
+ }
},
/**