Chromium Code Reviews| Index: chrome/browser/resources/options/certificate_manager.js |
| diff --git a/chrome/browser/resources/options/certificate_manager.js b/chrome/browser/resources/options/certificate_manager.js |
| index 5620b80c6c27fa972fbf84736255f91a0ffd0c43..280d0426cf2978edbc53bacbd4cff2f489852fb9 100644 |
| --- a/chrome/browser/resources/options/certificate_manager.js |
| +++ b/chrome/browser/resources/options/certificate_manager.js |
| @@ -146,26 +146,6 @@ cr.define('options', function() { |
| }, |
| }; |
| - // TODO(xiyuan): Use notification from backend instead of polling. |
| - // TPM token check polling timer. |
| - var tpmPollingTimer; |
| - |
| - // Initiate tpm token check if needed. |
| - function checkTpmToken() { |
| - var importAndBindButton = $('personalCertsTab-import-and-bind'); |
| - |
| - if (importAndBindButton && importAndBindButton.disabled) |
| - chrome.send('checkTpmTokenReady'); |
| - } |
| - |
| - // Stop tpm polling timer. |
| - function stopTpmTokenCheckPolling() { |
| - if (tpmPollingTimer) { |
| - window.clearTimeout(tpmPollingTimer); |
| - tpmPollingTimer = undefined; |
| - } |
| - } |
| - |
| ///////////////////////////////////////////////////////////////////////////// |
| // CertificateManager class: |
| @@ -212,14 +192,6 @@ cr.define('options', function() { |
| OptionsPage.showTab($('personal-certs-nav-tab')); |
| chrome.send('populateCertificateManager'); |
| } |
| - |
| - if (cr.isChromeOS) { |
| - // Ensure TPM token check on visible and stop polling when hidden. |
| - if (this.visible) |
| - checkTpmToken(); |
| - else |
| - stopTpmTokenCheckPolling(); |
| - } |
| } |
| }; |
| @@ -236,16 +208,13 @@ cr.define('options', function() { |
| CertificateRestoreOverlay.show(); |
| }; |
| - CertificateManager.onCheckTpmTokenReady = function(ready) { |
| + CertificateManager.onModelReady = function() { |
| var importAndBindButton = $('personalCertsTab-import-and-bind'); |
| - if (importAndBindButton) { |
| - importAndBindButton.disabled = !ready; |
| - |
| - // Check again after 5 seconds if Tpm is not ready and certificate manager |
| - // is still visible. |
| - if (!ready && CertificateManager.getInstance().visible) |
| - tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); |
| - } |
| + if (importAndBindButton !== null) |
| + importAndBindButton.disabled = false; |
| + $('personalCertsTab-import').disabled = false; |
| + $('serverCertsTab-import').disabled = false; |
| + $('caCertsTab-import').disabled = false; |
|
Ryan Sleevi
2013/12/13 19:16:59
Seems like this change can/should be split into a
mattm
2013/12/18 04:00:50
ok.
|
| }; |
| // Export |