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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/usbsignhandler.js
diff --git a/chrome/browser/resources/cryptotoken/usbsignhandler.js b/chrome/browser/resources/cryptotoken/usbsignhandler.js
index 57d2358304343bfe9a3284d1a156f176a9282324..7493cede4f654ee44c7d7b0a7b66f0f7f927e637 100644
--- a/chrome/browser/resources/cryptotoken/usbsignhandler.js
+++ b/chrome/browser/resources/cryptotoken/usbsignhandler.js
@@ -49,16 +49,13 @@ UsbSignHandler.prototype.run = function(cb) {
// Fail a sign request with an empty set of challenges.
return false;
}
- var timeoutMillis =
- this.request_.timeoutSeconds ?
+ var timeoutMillis = this.request_.timeoutSeconds ?
this.request_.timeoutSeconds * 1000 :
UsbSignHandler.DEFAULT_TIMEOUT_MILLIS;
/** @private {MultipleGnubbySigner} */
this.signer_ = new MultipleGnubbySigner(
- false /* forEnroll */,
- this.signerCompleted_.bind(this),
- this.signerFoundGnubby_.bind(this),
- timeoutMillis,
+ false /* forEnroll */, this.signerCompleted_.bind(this),
+ this.signerFoundGnubby_.bind(this), timeoutMillis,
this.request_.logMsgUrl);
return this.signer_.doSign(this.request_.signData);
};
@@ -88,8 +85,8 @@ UsbSignHandler.prototype.signerCompleted_ = function(anyPending) {
* results.
* @private
*/
-UsbSignHandler.prototype.signerFoundGnubby_ =
- function(signResult, moreExpected) {
+UsbSignHandler.prototype.signerFoundGnubby_ = function(
+ signResult, moreExpected) {
this.anyGnubbiesFound_ = true;
if (!signResult.code) {
var gnubby = signResult['gnubby'];
@@ -97,7 +94,7 @@ UsbSignHandler.prototype.signerFoundGnubby_ =
var info = new Uint8Array(signResult['info']);
this.notifySuccess_(gnubby, challenge, info);
} else if (SingleGnubbySigner.signErrorIndicatesInvalidKeyHandle(
- signResult.code)) {
+ signResult.code)) {
var gnubby = signResult['gnubby'];
this.notEnrolledGnubbies_.push(gnubby);
this.sendBogusEnroll_(gnubby);
@@ -115,31 +112,25 @@ UsbSignHandler.prototype.signerFoundGnubby_ =
/** @const */
UsbSignHandler.BOGUS_APP_ID_HASH = [
- 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
- 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
- 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
- 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41
+ 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
+ 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41,
+ 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41
];
/** @const */
UsbSignHandler.BOGUS_CHALLENGE_V1 = [
- 0x04, 0xA2, 0x24, 0x7D, 0x5C, 0x0B, 0x76, 0xF1,
- 0xDC, 0xCD, 0x44, 0xAF, 0x91, 0x9A, 0xA2, 0x3F,
- 0x3F, 0xBA, 0x65, 0x9F, 0x06, 0x78, 0x82, 0xFB,
- 0x93, 0x4B, 0xBF, 0x86, 0x55, 0x95, 0x66, 0x46,
- 0x76, 0x90, 0xDC, 0xE1, 0xE8, 0x6C, 0x86, 0x86,
- 0xC3, 0x03, 0x4E, 0x65, 0x52, 0x4C, 0x32, 0x6F,
- 0xB6, 0x44, 0x0D, 0x50, 0xF9, 0x16, 0xC0, 0xA3,
- 0xDA, 0x31, 0x4B, 0xD3, 0x3F, 0x94, 0xA5, 0xF1,
- 0xD3
+ 0x04, 0xA2, 0x24, 0x7D, 0x5C, 0x0B, 0x76, 0xF1, 0xDC, 0xCD, 0x44, 0xAF, 0x91,
+ 0x9A, 0xA2, 0x3F, 0x3F, 0xBA, 0x65, 0x9F, 0x06, 0x78, 0x82, 0xFB, 0x93, 0x4B,
+ 0xBF, 0x86, 0x55, 0x95, 0x66, 0x46, 0x76, 0x90, 0xDC, 0xE1, 0xE8, 0x6C, 0x86,
+ 0x86, 0xC3, 0x03, 0x4E, 0x65, 0x52, 0x4C, 0x32, 0x6F, 0xB6, 0x44, 0x0D, 0x50,
+ 0xF9, 0x16, 0xC0, 0xA3, 0xDA, 0x31, 0x4B, 0xD3, 0x3F, 0x94, 0xA5, 0xF1, 0xD3
];
/** @const */
UsbSignHandler.BOGUS_CHALLENGE_V2 = [
- 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
- 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
- 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
- 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42,
+ 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42
];
/**
@@ -241,10 +232,7 @@ UsbSignHandler.prototype.notifyError_ = function(code) {
return;
this.notified_ = true;
this.close();
- var reply = {
- 'type': 'sign_helper_reply',
- 'code': code
- };
+ var reply = {'type': 'sign_helper_reply', 'code': code};
this.cb_(reply);
};

Powered by Google App Engine
This is Rietveld 408576698