Extension Manager:Sqlite Storage: Difference between revisions

Line 104: Line 104:


''We could consider moving the add-on operations (uninstall, disable, enable etc.) onto the nsIAddon interface.''
''We could consider moving the add-on operations (uninstall, disable, enable etc.) onto the nsIAddon interface.''
This is an overview of the data stores in the extension manager:
[[Image:Extension_Manager-Sqlite_Storage-Storage.png]]
The extension manager has two main stores of information, the database (which holds installed add-ons and available updates) and an install cache which holds all of the add-ons being downloaded or pending restart. It also includes the available updates so that these pending items are managed in the same place.
This is not massively different to the current situation except that previously items in the install cache had to be added to the container in the database to allow the UI to function correctly.
The methods for retrieving addons on nsIExtensionManager pulls items from one or other of the database and install cache. <code>getPendingInstalls</code>, <code>getAvailableUpdates</code> both retrieve from the install cache. <code>getItemList</code> and <code>getItemForID</code> retrieve from the database.
The install cache is initially empty at every startup. When first queried it adds mirrored copies of all the available updates in the database. The installation methods create new items in the install cache. Update checks create new items in the database and a mirror of the same item in the install cache. Items remain in the install cache until shutdown.
''Maybe items can be removed if they have been installed and no restart was required''


=Major Tasks=
=Major Tasks=
canmove, Confirmed users
1,570

edits