QUIC - cleanup changes to sync chromium tree with internal source.
[chromium-blink-merge.git] / chrome / browser / resources / cryptotoken / approvedorigins.js
blob41c854ac934b6e4f84e67a50fc7ea7e2e4d02a55
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 Provides an interface to check whether the user has approved
7 * an origin to use security keys.
9 */
10 'use strict';
12 /**
13 * Allows the caller to check whether the user has approved the use of
14 * security keys from an origin.
15 * @interface
17 function ApprovedOrigins() {}
19 /**
20 * Checks whether the origin is approved to use security keys. (If not, an
21 * approval prompt may be shown.)
22 * @param {string} origin The origin to approve.
23 * @param {number=} opt_tabId A tab id to display approval prompt in, if
24 * necessary.
25 * @return {Promise<boolean>} A promise for the result of the check.
27 ApprovedOrigins.prototype.isApprovedOrigin = function(origin, opt_tabId) {};