B2G/gecko/services/aitc/modules/storage.js
/**
   * Determines what changes are to be made locally, given a list of
   * remote apps.
   *
   * @param remoteApps
   *        (Array)     An array of app records fetched from the AITC server.
   *
   * @param callback
   *        (function)  A callback to be invoked when processing is finished.
   */
Determines what changes are to be made locally, given a list of
remote apps.

@param remoteApps
(Array)     An array of app records fetched from the AITC server.

@param callback
(function)  A callback to be invoked when processing is finished.
Determines what changes are to be made locally given a list of remote apps . @param remoteApps ( Array ) An array of app records fetched from the AITC server . @param callback ( function ) A callback to be invoked when processing is finished .
function processApps(remoteApps, callback) {
    let self = this;
    this._log.info("Server check got " + remoteApps.length + " apps");
    DOMApplicationRegistry.getAllWithoutManifests(
      function _processAppsGotLocalApps(localApps) {
        let changes = self._determineLocalChanges(localApps, remoteApps);
        self._processChanges(changes, callback);
      }
    );
  }
function processApps ( remoteApps , callback ) { let self = this ; this . _log . info ( "Server check got " + remoteApps . length + " apps" ) ; DOMApplicationRegistry . getAllWithoutManifests ( function _processAppsGotLocalApps ( localApps ) { let changes = self . _determineLocalChanges ( localApps , remoteApps ) ; self . _processChanges ( changes , callback ) ; } ) ; }
Determines what changes are to be made locally, given a list of
 remote apps.
Determines what changes are to be made locally given a list of remote apps .
// Get the set of local apps, and then pass to _processApps. // _processApps will check for the validity of remoteApps.