Extension Manager:Sqlite Storage

From MozillaWiki
Jump to navigation Jump to search

Data Structures

Current Situation

Currently the extension manager caches add-on metadata, blocklist and disabled status. 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)