B2G/gecko/services/sync/modules/policies.js
/**
   * Process the locally stored clients list to figure out what mode to be in
   */
Process the locally stored clients list to figure out what mode to be in
Process the locally stored clients list to figure out what mode to be in
function updateClientMode() {
    let numClients = Clients.stats.numClients;
    if (this.numClients == numClients)
      return;
    this._log.debug("Client count: " + this.numClients + " -> " + numClients);
    this.numClients = numClients;
    if (numClients <= 1) {
      this._log.trace("Adjusting syncThreshold to SINGLE_USER_THRESHOLD");
      this.syncThreshold = SINGLE_USER_THRESHOLD;
    } else {
      this._log.trace("Adjusting syncThreshold to MULTI_DEVICE_THRESHOLD");
      this.syncThreshold = MULTI_DEVICE_THRESHOLD;
    }
    this.adjustSyncInterval();
  }
function updateClientMode ( ) { let numClients = Clients . stats . numClients ; if ( this . numClients == numClients ) return ; this . _log . debug ( "Client count: " + this . numClients + " -> " + numClients ) ; this . numClients = numClients ; if ( numClients <= 1 ) { this . _log . trace ( "Adjusting syncThreshold to SINGLE_USER_THRESHOLD" ) ; this . syncThreshold = SINGLE_USER_THRESHOLD ; } else { this . _log . trace ( "Adjusting syncThreshold to MULTI_DEVICE_THRESHOLD" ) ; this . syncThreshold = MULTI_DEVICE_THRESHOLD ; } this . adjustSyncInterval ( ) ; }
Process the locally stored clients list to figure out what mode to be in
Process the locally stored clients list to figure out what mode to be in
// Nothing to do if it's the same amount