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

Unified Diff: chrome/browser/resources/cryptotoken/signhelper.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
Index: chrome/browser/resources/cryptotoken/signhelper.js
diff --git a/chrome/browser/resources/cryptotoken/signhelper.js b/chrome/browser/resources/cryptotoken/signhelper.js
new file mode 100644
index 0000000000000000000000000000000000000000..ecd7e76782f2ad4e2db043413b25478feac0f48f
--- /dev/null
+++ b/chrome/browser/resources/cryptotoken/signhelper.js
@@ -0,0 +1,49 @@
+// 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 sign
+ * requests.
+ * @author juanlang@google.com (Juan Lang)
+ */
+'use strict';
+
+/**
+ * A helper for sign requests.
+ * @extends {Closeable}
+ * @interface
+ */
+function SignHelper() {}
+
+/**
+ * Attempts to sign the provided challenges.
+ * @param {Array.<SignHelperChallenge>} challenges the new challenges to sign.
+ * @return {boolean} whether the challenges were successfully added.
+ */
+SignHelper.prototype.doSign = function(challenges) {};
+
+/** Closes this helper. */
+SignHelper.prototype.close = function() {};
+
+/**
+ * A factory for creating sign helpers.
+ * @interface
+ */
+function SignHelperFactory() {}
+
+/**
+ * Creates a new sign helper.
+ * @param {Countdown} timer Timer after whose expiration the caller is no longer
+ * interested in the result of a sign request.
+ * @param {function(number, boolean)} errorCb Called when a sign request fails
+ * with an error code and whether any gnubbies were found.
+ * @param {function(SignHelperChallenge, string)} successCb Called with the
+ * signature produced by a successful sign request.
+ * @param {(function(number, boolean)|undefined)} opt_progressCb Called with
+ * progress updates to the sign request.
+ * @param {string=} opt_logMsgUrl A URL to post log messages to.
+ * @return {SignHelper} The newly created helper.
+ */
+SignHelperFactory.prototype.createHelper =
+ function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {};
« no previous file with comments | « chrome/browser/resources/cryptotoken/signer.js ('k') | chrome/browser/resources/cryptotoken/singlesigner.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698