Extension Manager:Sqlite Storage
Current Situation
Currently the extension manager caches add-on metadata, blocklist and disabled status, downloads, pending installs and known updates. This is an incomplete list of the highlights:
- Add-on metadata (majority from install.rdf)
- id
- version
- type
- hidden
- appManaged
- targetApplication entries (modified by update checks)
- default metadata
- localized metadata
- dependencies
- appDisabled (set based on blocklist, compatibility and security)
- userDisabled (user controlled)
- available update (added by update checks)
- Pending installs (essentially a subset of the above items, added so they appear in the UI before restarting)
- Downloads (Used to display download progress in the UI)
The UI uses a template to display items, however it does not use the real extensions.rdf datasource. Instead a dynamic datasource is provided that calculates values for certain attributes:
- Add-on metadata
- iconURL (may come from the real datasource, may be a direct file uri to a theme's icon)
- previewImage (a direct file uri to the theme's preview image)
- aboutURL (hidden if the add-on is disabled)
- installDate (returns the mtime of the extension's directory)
- compatible (returns whether the extension is compatible with the application)
- providesUpdatesSecurely (whether the update path is secure)
- satisfiesDependencies (whether all dependencies are available)
- blocklisted (asks the blocklist service if the add-on is blocklisted)
- opType (any pending operation for the add-on)
- appManaged (can only return true if the extension is installed by the app)
- hidden (can only return true if the extension is in a restricted install location)
- locked (can only return true if the extension is in a restricted install location)
- textual data (retrieved from properties, the localized area or the default area as appropriate)
- isDisabled (based on appDisabled and userDisabled)
- updateable (checks preferences and permissions to see if this add-on can be updated)
- Downloads
- state (current install state)
- progress (current download progress)
Every pane of the UI is currently built using an rdf based template. Switching panes swaps in a new template in a bunch of complex code. The Get Add-ons pane and Plugins pane are made available through the use of two in-memory datasources added to the templates composite datasource.
Much of the UI is dependant on the dynamically generated properties listed above to display the text in the correct locales and show state correctly.
Proposed Changes
Major Tasks
- API Implementation
- UI Work
- Replace XPInstall based downloader