extensions/amp-consent/0.1/consent-state-manager.js
/**
   * Register and create a consent instance to manage state
   * @param {string} instanceId
   * @param {!Object} config
   */
Register and create a consent instance to manage state
@param {string} instanceId
@param {!Object} config
Register and create a consent instance to manage state @param { string } instanceId @param { !Object } config
registerConsentInstance(instanceId, config) {
    if (this.instance_) {
      dev().error(TAG, 'Cannot register consent instance %s, ' +
          'instance %s has already been registered.',
      instanceId, this.instanceId_);
      return;
    }
    this.instanceId_ = instanceId;
    this.instance_ = new ConsentInstance(this.ampdoc_, instanceId, config);
    if (this.consentReadyResolver_) {
      this.consentReadyResolver_();
      this.consentReadyResolver_ = null;
    }
  }
registerConsentInstance ( instanceId , config ) { if ( this . instance_ ) { dev ( ) . error ( TAG , 'Cannot register consent instance %s, ' + 'instance %s has already been registered.' , instanceId , this . instanceId_ ) ; return ; } this . instanceId_ = instanceId ; this . instance_ = new ConsentInstance ( this . ampdoc_ , instanceId , config ) ; if ( this . consentReadyResolver_ ) { this . consentReadyResolver_ ( ) ; this . consentReadyResolver_ = null ; } }
Register and create a consent instance to manage state
 @param {string} instanceId
 @param {!Object} config
Register and create a consent instance to manage state @param { string } instanceId @param { !Object } config