Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / resources / cryptotoken / devicefactoryregistry.js
blobc1f4bee5282a75be4215d18e5f17fc4428bfaf50
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.
5 /**
6  * @fileoverview Class providing common dependencies for the extension's
7  * bottom half.
8  */
9 'use strict';
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;
28 /** @return {!GnubbyFactory} A Gnubby factory. */
29 DeviceFactoryRegistry.prototype.getGnubbyFactory = function() {
30   return this.gnubbyFactory_;
33 /** @return {!CountdownFactory} A countdown factory. */
34 DeviceFactoryRegistry.prototype.getCountdownFactory = function() {
35   return this.countdownFactory_;
38 /** @return {!IndividualAttestation} An individual attestation implementation.
39  */
40 DeviceFactoryRegistry.prototype.getIndividualAttestation = function() {
41   return this.individualAttestation_;