Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: chrome/browser/resources/cryptotoken/enrollhelper.js

Issue 249913002: FIDO U2F component extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with HEAD Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/cryptotoken/enroller.js ('k') | chrome/browser/resources/cryptotoken/gnubbies.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/cryptotoken/enrollhelper.js
diff --git a/chrome/browser/resources/cryptotoken/enrollhelper.js b/chrome/browser/resources/cryptotoken/enrollhelper.js
new file mode 100644
index 0000000000000000000000000000000000000000..e2587f1826c5bc81f505bc2984dc53d55fc80819
--- /dev/null
+++ b/chrome/browser/resources/cryptotoken/enrollhelper.js
@@ -0,0 +1,53 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview Provides a "bottom half" helper to assist with raw enroll
+ * requests.
+ * @author juanlang@google.com (Juan Lang)
+ */
+'use strict';
+
+/**
+ * A helper for enroll requests.
+ * @extends {Closeable}
+ * @interface
+ */
+function EnrollHelper() {}
+
+/**
+ * Attempts to enroll using the provided data.
+ * @param {Array} enrollChallenges an array enroll challenges.
+ * @param {Array.<SignHelperChallenge>} signChallenges a list of sign
+ * challenges for already enrolled gnubbies, to prevent double-enrolling a
+ * device.
+ */
+EnrollHelper.prototype.doEnroll =
+ function(enrollChallenges, signChallenges) {};
+
+/** Closes this helper. */
+EnrollHelper.prototype.close = function() {};
+
+/**
+ * A factory for creating enroll helpers.
+ * @interface
+ */
+function EnrollHelperFactory() {}
+
+/**
+ * Creates a new enroll helper.
+ * @param {!Countdown} timer Timer after whose expiration the caller is no
+ * longer interested in the result of an enroll request.
+ * @param {function(number, boolean)} errorCb Called when an enroll request
+ * fails with an error code and whether any gnubbies were found.
+ * @param {function(string, string)} successCb Called with the result of a
+ * successful enroll request, along with the version of the gnubby that
+ * provided it.
+ * @param {(function(number, boolean)|undefined)} opt_progressCb Called with
+ * progress updates to the enroll request.
+ * @param {string=} opt_logMsgUrl A URL to post log messages to.
+ * @return {EnrollHelper} the newly created helper.
+ */
+EnrollHelperFactory.prototype.createHelper =
+ function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {};
« no previous file with comments | « chrome/browser/resources/cryptotoken/enroller.js ('k') | chrome/browser/resources/cryptotoken/gnubbies.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698