Readonly
canWhether or not the Update Service can download and install updates right now. On Windows, this is a function of whether or not the maintenance service is installed and enabled. On other systems, and as a fallback on Windows, this depends on whether the current user has write access to the install directory. On all systems, this includes transient factors such as whether other instances are running.
Readonly
canWhether or not the Update Service can check for updates right now. This is a function of whether or not application update is disabled by the application, the platform the application is running on, and transient factors such as whether other instances are running.
Readonly
canWhether the Update Service is able to stage updates right now. On all systems, this includes transient factors such as whether other instances are running.
Readonly
canOn Windows, whether the Update Service can use BITS right now. This includes transient factors such as whether other instances are running.
Readonly
canWhether or not the Update Service can usually download and install updates. On Windows, this is a function of whether or not the maintenance service is installed and enabled. On other systems, and as a fallback on Windows, this depends on whether the current user has write access to the install directory.
Readonly
canWhether or not the Update Service can usually check for updates. This is a function of whether or not application update is disabled by the application and the platform the application is running on.
Readonly
canWhether the Update Service is usually able to stage updates.
Readonly
canOn Windows, whether the Update Service can usually use BITS.
Readonly
currentThe current state of the application updater. Returns one of the enumerated constants, above.
The expected flow looks like this: STATE_IDLE -> STATE_DOWNLOADING -> STATE_STAGING -> STATE_PENDING If a failure is encountered at some time, we go back to STATE_IDLE. If staging is not enabled, STATE_STAGING will be skipped.
We may download additional updates after we reach STATE_PENDING. If we do, the state will remain at STATE_PENDING while we download the new update. If we restart during that time, the pending update will be installed and the partially downloaded update will be discarded. If a download completes successfully, there will be a brief period where STATE_PENDING is no longer correct, because the Update Service is in the process of removing the old update and replacing it with the new update. So if we restart during that period, the update will not be correctly installed. Thus, we switch away from STATE_PENDING to STATE_SWAP during that time. Assuming that the swap is successful, the state will then switch back STATE_STAGING (assuming that staging is enabled), then to STATE_PENDING. So the full expected state flow looks more like this: STATE_IDLE -> STATE_DOWNLOADING -> STATE_STAGING -> STATE_PENDING -> STATE_SWAP -> STATE_STAGING -> STATE_PENDING -> STATE_SWAP -> STATE_STAGING -> STATE_PENDING -> ... (Omitting STATE_STAGING if staging is not enabled).
Readonly
disabledThere are a few things that can disable the Firefox updater at runtime such as Enterprise Policies. If this attribute is set to true, update should not be performed and most update interfaces will return errors.
Readonly
elevationWhether or not the installation requires elevation. Currently only implemented on OSX, returns false on other platforms.
Readonly
isWhether or not a different instance is handling updates of this installation. This currently only ever returns true on Windows when 2 instances of an application are open. Only one of the instances will actually handle updates for the installation.
Readonly
manualIndicates whether or not the enterprise policy that allows only manual updating is active. One of the features of this policy is not being notified of updates; you are intended to need to manually tell Firefox that you want to update each time that you want to do so.
This policy has some implications for the way that update checks work. We don't want to do background update checks. Without being able to notify the user, there's not really anything to do if we find one. However, we will allow "automatic" update checks when loading the update interfaces in about:preferences, the About Dialog, etc. When those interfaces are open, we do have a way of telling the user about an update without bothering them with a doorhanger.
This can be set to true to prevent updates being processed beyond starting an update download. This should only be used when we are being run as a background task. This exists to prevent a particularly fast update download from beginning to stage while the background task is shutting down.
Readonly
stateA Promise that resolves immediately after currentState
changes.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Adds a listener that receives progress and state information about the update that is currently being downloaded, e.g. to update a user interface. Registered listeners will be called for all downloads and all updates during a browser session; they are not automatically removed following the first (successful or failed) download.
An object implementing nsIRequestObserver and optionally nsIProgressEventSink that is to be notified of state and progress information as the update is downloaded.
Checks for available updates in the background using the listener provided by the application update service for background checks.
true if the update check was started, false if not. Note that the check starting does not necessarily mean that the check will succeed or that an update will be downloaded.
Starts downloading the update passed. Once the update is downloaded, it will automatically be prepared for installation.
A promise that resolves to true
if an update download was
started, otherwise `false.
The update to download.
This is the function called internally by the Application Update Service
when an update check is complete. Though this can be used to potentially
start an update download, downloadUpdate
should used for that.
This is mostly exposed in the interface in order to make it accessible for
testing.
Stop the active update download process. This is the equivalent of calling nsIRequest::Cancel on the download's nsIRequest. When downloading with nsIIncrementalDownload, this will leave the partial download in place. When downloading with BITS, any partial download progress will be removed.
A Promise that resolves once the download has been stopped.
Generated using TypeDoc
An interface describing a global application service that handles performing background update checks and provides utilities for selecting and downloading update patches.