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

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

Issue 799923007: Enable 3rd party support for Security Keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove duplicate line from merge Created 6 years 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/singlesigner.js
diff --git a/chrome/browser/resources/cryptotoken/singlesigner.js b/chrome/browser/resources/cryptotoken/singlesigner.js
index d2f2333a813555f1e976d35a1bdbe148eddfc844..9bcd065bafc3eb56ed45e94bdc33dfbea95ea3bf 100644
--- a/chrome/browser/resources/cryptotoken/singlesigner.js
+++ b/chrome/browser/resources/cryptotoken/singlesigner.js
@@ -253,6 +253,22 @@ SingleGnubbySigner.prototype.openCallback_ = function(rc, gnubby) {
* @private
*/
SingleGnubbySigner.prototype.versionCallback_ = function(rc, opt_data) {
+ if (rc == DeviceStatusCodes.BUSY_STATUS) {
+ if (this.timer_ && this.timer_.expired()) {
+ this.goToError_(DeviceStatusCodes.TIMEOUT_STATUS);
+ return;
+ }
+ // There's still time: resync and retry.
+ var self = this;
+ this.gnubby_.sync(function(code) {
+ if (code) {
+ self.goToError_(code, true);
+ return;
+ }
+ self.gnubby_.version(self.versionCallback_.bind(self));
+ });
+ return;
+ }
if (rc) {
this.goToError_(rc, true);
return;
« no previous file with comments | « chrome/browser/resources/cryptotoken/manifest.json ('k') | chrome/browser/resources/cryptotoken/usbsignhandler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698