Chromium Code Reviews| Index: chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js |
| diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js |
| index 934a2242edb4eed963f4841afa5624d80bfd40fe..95e8fd340f35a6e2d4c55b879af569db39501be3 100644 |
| --- a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js |
| +++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js |
| @@ -141,12 +141,31 @@ Polymer({ |
| }, |
| /** |
| - * @param {string} certificateType The type of this certificate. |
| * @return {boolean} Whether the certificate can be edited. |
| * @private |
| */ |
| - canEdit_: function(certificateType) { |
| - return this.certificateType == settings.CertificateType.CA; |
| + canEdit_: function() { |
|
tommycli
2016/04/07 21:35:01
Can these be pure functions a la the style guide P
dpapad
2016/04/07 22:07:23
Done.
|
| + return this.certificateType == settings.CertificateType.CA && |
| + !this.model.policy; |
| + }, |
| + |
| + /** |
| + * @return {boolean} Whether the certificate can be exported. |
| + * @private |
| + */ |
| + canExport_: function() { |
| + if (this.certificateType == settings.CertificateType.PERSONAL) { |
| + return this.model.extractable; |
| + } |
| + return true; |
| + }, |
| + |
| + /** |
| + * @return {boolean} Whether the certificate can be deleted. |
| + * @private |
| + */ |
| + canDelete_: function() { |
| + return !this.model.readonly && !this.model.policy; |
| }, |
| /** @private */ |