OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 | 7 |
8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
9 // CertificateManagerTab class: | 9 // CertificateManagerTab class: |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 }; | 201 }; |
202 | 202 |
203 CertificateManager.exportPersonalAskPassword = function(args) { | 203 CertificateManager.exportPersonalAskPassword = function(args) { |
204 CertificateBackupOverlay.show(); | 204 CertificateBackupOverlay.show(); |
205 }; | 205 }; |
206 | 206 |
207 CertificateManager.importPersonalAskPassword = function(args) { | 207 CertificateManager.importPersonalAskPassword = function(args) { |
208 CertificateRestoreOverlay.show(); | 208 CertificateRestoreOverlay.show(); |
209 }; | 209 }; |
210 | 210 |
211 CertificateManager.onModelReady = function(tpm_available) { | 211 CertificateManager.onModelReady = function(userDbAvailable, |
212 if (tpm_available) | 212 tpmAvailable) { |
| 213 if (!userDbAvailable) |
| 214 return; |
| 215 if (tpmAvailable) |
213 $('personalCertsTab-import-and-bind').disabled = false; | 216 $('personalCertsTab-import-and-bind').disabled = false; |
214 $('personalCertsTab-import').disabled = false; | 217 $('personalCertsTab-import').disabled = false; |
215 $('serverCertsTab-import').disabled = false; | 218 $('serverCertsTab-import').disabled = false; |
216 $('caCertsTab-import').disabled = false; | 219 $('caCertsTab-import').disabled = false; |
217 }; | 220 }; |
218 | 221 |
219 // Export | 222 // Export |
220 return { | 223 return { |
221 CertificateManagerTab: CertificateManagerTab, | 224 CertificateManagerTab: CertificateManagerTab, |
222 CertificateManager: CertificateManager | 225 CertificateManager: CertificateManager |
223 }; | 226 }; |
224 }); | 227 }); |
OLD | NEW |