@@ -192,11 +192,11 @@ if (messageEvent.data.target != "cackey") { return; } - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("START MESSAGE"); console.log(messageEvent.data); console.log("END MESSAGE"); } @@ -211,11 +211,11 @@ } } } if (messageEvent.data.command == "init" && messageEvent.data.status == "success") { - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Initialization completed, resending any queued messages"); } cackeyInitPCSCCompleted("success"); } @@ -304,11 +304,11 @@ var tmpMessageEvent; tmpMessageEvent = cackeyMessagesToRetry[messageIdx]; if (pinWindowPINValue == "") { - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] The PIN dialog was closed without gathering a PIN, treating it as a failure."); } tmpMessageEvent.data.status = "error"; tmpMessageEvent.data.error = "PIN window closed without a PIN being provided"; @@ -405,11 +405,11 @@ * Handler for messages from Chrome related to listing certificates */ function cackeyListCertificates(chromeCallback) { var callbackId; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Asked to provide a list of certificates -- throwing that request over to the NaCl side... "); } callbackId = ++cackeyOutstandingCallbackCounter; @@ -422,11 +422,11 @@ } ); cackeyOutstandingCallbacks[callbackId] = chromeCallback; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Thrown."); } }, chromeCallback); return; @@ -436,11 +436,11 @@ * Handler for messages from Chrome related to listing readers */ function cackeyListReaders(chromeCallback) { var callbackId; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Asked to provide a list of readers -- throwing that request over to the NaCl side... "); } callbackId = ++cackeyOutstandingCallbackCounter; @@ -453,11 +453,11 @@ } ); cackeyOutstandingCallbacks[callbackId] = chromeCallback; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Thrown."); } }, chromeCallback); return; @@ -497,11 +497,11 @@ digest.set(digestHeader, 0); digest.set(new Uint8Array(signRequest.digest), digestHeader.length); delete digestHeader; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Asked to sign a message -- throwing that request over to the NaCl side... "); } callbackId = ++cackeyOutstandingCallbackCounter; @@ -524,11 +524,11 @@ cackeyInitPCSC(function() { cackeyHandle.postMessage(command); cackeyOutstandingCallbacks[callbackId] = chromeCallback; - if (GoogleSmartCard.IS_DEBUG_BUILD) { + if (goog.DEBUG) { console.log("[cackey] Thrown."); } }, chromeCallback); return; @@ -770,11 +770,11 @@ return; } /* Verify that we can register callbacks */ if (!chrome.certificateProvider) { - if (!GoogleSmartCard.IS_DEBUG_BUILD) { + if (!goog.DEBUG) { console.info("[cackey] This extension's primary functionality only works on ChromeOS! You won't be able to do much with it."); } } elementEmbed = document.createElement('embed');