B2G/gecko/services/sync/modules/identity.js
/**
   * Obtain the active SyncKeyBundle.
   *
   * This returns a SyncKeyBundle representing a key pair derived from the
   * Sync Key on success. If no Sync Key is present or if the Sync Key is not
   * valid, this returns null.
   *
   * The SyncKeyBundle should be treated as immutable.
   */
Obtain the active SyncKeyBundle.
This returns a SyncKeyBundle representing a key pair derived from the
Sync Key on success. If no Sync Key is present or if the Sync Key is not
valid, this returns null.

The SyncKeyBundle should be treated as immutable.
Obtain the active SyncKeyBundle . This returns a SyncKeyBundle representing a key pair derived from the Sync Key on success . If no Sync Key is present or if the Sync Key is not valid this returns null . The SyncKeyBundle should be treated as immutable .
get syncKeyBundle() {
    if (!this.username) {
      this._log.warn("Attempted to obtain Sync Key Bundle with no username set!");
      return null;
    }
    if (!this.syncKey) {
      this._log.warn("Attempted to obtain Sync Key Bundle with no Sync Key " +
                     "set!");
      return null;
    }
    if (!this._syncKeyBundle) {
      try {
        this._syncKeyBundle = new SyncKeyBundle(this.username, this.syncKey);
      } catch (ex) {
        this._log.warn(Utils.exceptionStr(ex));
        return null;
      }
    }
    return this._syncKeyBundle;
  }
get syncKeyBundle ( ) { if ( ! this . username ) { this . _log . warn ( "Attempted to obtain Sync Key Bundle with no username set!" ) ; return null ; } if ( ! this . syncKey ) { this . _log . warn ( "Attempted to obtain Sync Key Bundle with no Sync Key " + "set!" ) ; return null ; } if ( ! this . _syncKeyBundle ) { try { this . _syncKeyBundle = new SyncKeyBundle ( this . username , this . syncKey ) ; } catch ( ex ) { this . _log . warn ( Utils . exceptionStr ( ex ) ) ; return null ; } } return this . _syncKeyBundle ; }
Obtain the active SyncKeyBundle.
Obtain the active SyncKeyBundle .
// We can't obtain a bundle without a username set.