High level information: https://web.dev/manifest-updates/
The manifest update process is required whenever a new manifest is served to an existing web_app, which would mean that the database entries corresponding to that web application needs to be updated. To do this, the following steps are kicked off:
Whenever the tab has kicked off a navigation to an url for a web_app, a check is kicked off to determine if a manifest update is required or not. The update process is aborted if the following conditions are satisfied:
All pending updates are tracked in a map of update states keyed by app id by the ManifestUpdateManager
. If a successful update needs to happen, the process goes ahead by executing the following steps:
ManifestUpdateCheckCommand
takes over to perform the following tasks:ManifestUpdateFinalizeCommand
runs to write the new data to the DB and verify that a successful write has completed.ManifestUpdateManagerBrowserTest
contains browser tests for the entire end-to-end working of the ManifestUpdateManager.ManifestUpdateCheckCommandTest
contains unit tests for the comparison part of the manifest update operation.ManifestUpdateFinalizeCommandTest
contains unit tests for the data writing section of the manifest update operation.