Firefox/Go Faster/Client Implementation Plan: Difference between revisions

Line 35: Line 35:
During runtime the client will periodically make a HTTPS request to a specific URL including data on the application channel, version and OS The manifest returned lists the specific system add-ons that should be used with that application.
During runtime the client will periodically make a HTTPS request to a specific URL including data on the application channel, version and OS The manifest returned lists the specific system add-ons that should be used with that application.


An example of the data the manifest must include:
An example response:


  {
  <updates><addons>
   "<addon-1-ID>": {
   <addon id="loop@mozilla.org" URL="https://addons.mozilla.org/addons/loop.xpi" version="12"/>
    "version": "1.2.0",
   <addon id="pdfjs@mozilla.org" URL="https://cdn.addons.mozilla.org/addons/pdfjs.xpi" version="1.4"/>
    "xpiURL": "http://mozilla.com/foo/bar/addon1.xpi",
  </addons></updates>
    "xpiHash": "sha256:38974658476582645723465802458972345",
  },
   "<addon-2-ID>": {
    "version": "1.0.0",
    "xpiURL": "http://mozilla.com/foo/bar/addon2.xpi",
    "xpiHash": "sha256:45676878579689577567674563576746746",
  }
  }


This manifest could be a standalone file or embedded in the existing update.xml file somewhere. The former is a little easier to implement on the client side.
Any add-on versions that are not already available locally are downloaded.
 
Any add-on versions that are not already available locally are downloaded and checked against the given hash (is this needed given that we're signing the add-ons too?).


* '''Bug: Download and install new system add-ons'''
* '''Bug: Download and install new system add-ons'''


Once all the add-on versions listed in the manifest are available locally this list replaces the current known-good set, any enabled system add-ons not in the set are disabled, any system add-ons in the set not enabled are enabled.
Once all the add-on versions listed in the manifest are available locally and are verified to be usable with the current application they are copied to a new directory inside <profile>/features and the known-good set is updated with the new set. Any enabled system add-ons not in the set are disabled, any system add-ons in the set not enabled are enabled.


* '''Bug: Replace the current set of system add-ons with the new known-good set'''
* '''Bug: Replace the current set of system add-ons with the new known-good set'''
canmove, Confirmed users
1,570

edits