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

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

Issue 308173002: Fix race and remove unused features in cryptotoken extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix type annotation Created 6 years, 7 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/signhelper.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/cryptotoken/usbsignhelper.js
diff --git a/chrome/browser/resources/cryptotoken/usbsignhelper.js b/chrome/browser/resources/cryptotoken/usbsignhelper.js
index 224ead2daea0929034d02b2416549fafbab34014..f39ac132e443ce6baac0af67124c402c52613ca5 100644
--- a/chrome/browser/resources/cryptotoken/usbsignhelper.js
+++ b/chrome/browser/resources/cryptotoken/usbsignhelper.js
@@ -15,23 +15,20 @@ var CORRUPT_sign = false;
* 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 {function(SignHelperChallenge, string, string=)} successCb Called with
+ * the signature produced by a successful sign request.
* @param {string=} opt_logMsgUrl A URL to post log messages to.
* @constructor
* @implements {SignHelper}
*/
-function UsbSignHelper(factory, timer, errorCb, successCb, opt_progressCb,
- opt_logMsgUrl) {
+function UsbSignHelper(factory, timer, errorCb, successCb, opt_logMsgUrl) {
/** @private {!GnubbyFactory} */
this.factory_ = factory;
/** @private {Countdown} */
this.timer_ = timer;
/** @private {function(number, boolean)} */
this.errorCb_ = errorCb;
- /** @private {function(SignHelperChallenge, string)} */
+ /** @private {function(SignHelperChallenge, string, string=)} */
this.successCb_ = successCb;
/** @private {string|undefined} */
this.logMsgUrl_ = opt_logMsgUrl;
@@ -189,7 +186,8 @@ UsbSignHelper.prototype.notifySuccess_ = function(gnubby, challenge, info) {
encodedChallenge['appIdHash'] = B64_encode(challenge['appIdHash']);
encodedChallenge['keyHandle'] = B64_encode(challenge['keyHandle']);
this.successCb_(
- /** @type {SignHelperChallenge} */ (encodedChallenge), B64_encode(info));
+ /** @type {SignHelperChallenge} */ (encodedChallenge), B64_encode(info),
+ 'USB');
};
/**
@@ -329,15 +327,13 @@ function UsbSignHelperFactory(gnubbyFactory) {
* 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 {UsbSignHelper} the newly created helper.
*/
UsbSignHelperFactory.prototype.createHelper =
- function(timer, errorCb, successCb, opt_progressCb, opt_logMsgUrl) {
+ function(timer, errorCb, successCb, opt_logMsgUrl) {
var helper =
new UsbSignHelper(this.gnubbyFactory_, timer, errorCb, successCb,
- opt_progressCb, opt_logMsgUrl);
+ opt_logMsgUrl);
return helper;
};
« no previous file with comments | « chrome/browser/resources/cryptotoken/signhelper.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698