Home | History | Annotate | Download | only in cryptotoken
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 /**
      6  * @fileoverview Class providing common dependencies for the extension's
      7  * bottom half.
      8  */
      9 'use strict';
     10 
     11 /**
     12  * @param {!GnubbyFactory} gnubbyFactory A Gnubby factory.
     13  * @param {!CountdownFactory} countdownFactory A countdown timer factory.
     14  * @param {!IndividualAttestation} individualAttestation An individual
     15  *     attestation implementation.
     16  * @constructor
     17  */
     18 function DeviceFactoryRegistry(gnubbyFactory, countdownFactory,
     19     individualAttestation) {
     20   /** @private {!GnubbyFactory} */
     21   this.gnubbyFactory_ = gnubbyFactory;
     22   /** @private {!CountdownFactory} */
     23   this.countdownFactory_ = countdownFactory;
     24   /** @private {!IndividualAttestation} */
     25   this.individualAttestation_ = individualAttestation;
     26 }
     27 
     28 /** @return {!GnubbyFactory} A Gnubby factory. */
     29 DeviceFactoryRegistry.prototype.getGnubbyFactory = function() {
     30   return this.gnubbyFactory_;
     31 };
     32 
     33 /** @return {!CountdownFactory} A countdown factory. */
     34 DeviceFactoryRegistry.prototype.getCountdownFactory = function() {
     35   return this.countdownFactory_;
     36 };
     37 
     38 /** @return {!IndividualAttestation} An individual attestation implementation.
     39  */
     40 DeviceFactoryRegistry.prototype.getIndividualAttestation = function() {
     41   return this.individualAttestation_;
     42 };
     43