summaryrefslogtreecommitdiffstats
path: root/toolkit/components/telemetry/app
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /toolkit/components/telemetry/app
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.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);
+ }
},
/**