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

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

Issue 495033002: Tolerate that CMD_SYNC does not exist (per U2F spec). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/cryptotoken/gnubby.js
diff --git a/chrome/browser/resources/cryptotoken/gnubby.js b/chrome/browser/resources/cryptotoken/gnubby.js
index edd19b708da1473eb3fef11abb645f958db124bc..c8c03294b44ea9c8ed69613c1946aa9c3b2125fb 100644
--- a/chrome/browser/resources/cryptotoken/gnubby.js
+++ b/chrome/browser/resources/cryptotoken/gnubby.js
@@ -523,7 +523,10 @@ Gnubby.prototype.sync = function(cb) {
}
function sendInitSentinel() {
- var cid = Gnubby.BROADCAST_CID;
+ var cid = self.cid;
+ if (cid == Gnubby.defaultChannelId_(self.gnubbyInstance, self.which)) {
+ cid = Gnubby.BROADCAST_CID;
+ }
var cmd = GnubbyDevice.CMD_INIT;
self.dev.queueCommand(cid, cmd, nonce);
}
@@ -628,8 +631,7 @@ Gnubby.prototype.sync = function(cb) {
completionAction = syncCompletionAction;
}
- if (Gnubby.gnubbies_.isSharedAccess(this.which) &&
- this.cid == Gnubby.defaultChannelId_(this.gnubbyInstance, this.which)) {
+ if (Gnubby.gnubbies_.isSharedAccess(this.which)) {
setInit();
} else {
setSync();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698