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

Side by Side Diff: chrome/browser/resources/options2/certificate_manager.js

Issue 10407072: certificate manager: Disable export option for TPM-backed certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move the extractability test out of net/ Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 CertificateManagerTab.prototype = { 109 CertificateManagerTab.prototype = {
110 110
111 /** 111 /**
112 * Update button state. 112 * Update button state.
113 * @private 113 * @private
114 * @param {!Object} data The data of the selected item. 114 * @param {!Object} data The data of the selected item.
115 */ 115 */
116 updateButtonState: function(data) { 116 updateButtonState: function(data) {
117 var isCert = !!data && data.id.substr(0, 5) == 'cert-'; 117 var isCert = !!data && data.id.substr(0, 5) == 'cert-';
118 var readOnly = !!data && data.readonly; 118 var readOnly = !!data && data.readonly;
119 var extractable = !!data && data.extractable;
119 var hasChildren = this.tree.items.length > 0; 120 var hasChildren = this.tree.items.length > 0;
120 this.viewButton.disabled = !isCert; 121 this.viewButton.disabled = !isCert;
121 if (this.editButton !== null) 122 if (this.editButton !== null)
122 this.editButton.disabled = !isCert; 123 this.editButton.disabled = !isCert;
123 if (this.backupButton !== null) 124 if (this.backupButton !== null)
124 this.backupButton.disabled = !isCert; 125 this.backupButton.disabled = !isCert || !extractable;
125 if (this.backupAllButton !== null) 126 if (this.backupAllButton !== null)
126 this.backupAllButton.disabled = !hasChildren; 127 this.backupAllButton.disabled = !hasChildren;
127 if (this.exportButton !== null) 128 if (this.exportButton !== null)
128 this.exportButton.disabled = !isCert; 129 this.exportButton.disabled = !isCert;
129 this.deleteButton.disabled = !isCert || readOnly; 130 this.deleteButton.disabled = !isCert || readOnly;
130 }, 131 },
131 132
132 /** 133 /**
133 * Handles certificate tree selection change. 134 * Handles certificate tree selection change.
134 * @private 135 * @private
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); 246 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000);
246 } 247 }
247 }; 248 };
248 249
249 // Export 250 // Export
250 return { 251 return {
251 CertificateManagerTab: CertificateManagerTab, 252 CertificateManagerTab: CertificateManagerTab,
252 CertificateManager: CertificateManager 253 CertificateManager: CertificateManager
253 }; 254 };
254 }); 255 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698