| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-ca-trust-edit-dialog' is the a dialog allowing the user to edit the | 7 * 'settings-ca-trust-edit-dialog' is the a dialog allowing the user to edit the |
| 8 * trust lever of a given certificate authority. | 8 * trust lever of a given certificate authority. |
| 9 * | 9 * |
| 10 * @group Chrome Settings Elements | 10 * @group Chrome Settings Elements |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 /** @private */ | 48 /** @private */ |
| 49 onCancelTap_: function() { | 49 onCancelTap_: function() { |
| 50 this.$.dialog.close(); | 50 this.$.dialog.close(); |
| 51 }, | 51 }, |
| 52 | 52 |
| 53 /** @private */ | 53 /** @private */ |
| 54 onOkTap_: function() { | 54 onOkTap_: function() { |
| 55 this.$.spinner.active = true; | 55 this.$.spinner.active = true; |
| 56 this.browserProxy_.editCaCertificateTrust( | 56 this.browserProxy_.editCaCertificateTrust( |
| 57 this.model.id, this.$.ssl.checked, | 57 this.model.id, this.$.ssl.checked, |
| 58 this.$.email.checked, this.$.objSign.checked).then(function() { | 58 this.$.email.checked, this.$.objSign.checked).then( |
| 59 this.$.spinner.active = false; | 59 function() { |
| 60 this.$.dialog.close(); | 60 this.$.spinner.active = false; |
| 61 }.bind(this), | 61 this.$.dialog.close(); |
| 62 /** @param {!CertificatesError} error */ | 62 }.bind(this), |
| 63 function(error) { | 63 /** @param {!CertificatesError} error */ |
| 64 // TODO(dpapad): Display error here. | 64 function(error) { |
| 65 }); | 65 this.$.dialog.close(); |
| 66 this.fire('certificates-error', error); |
| 67 }.bind(this)); |
| 66 }, | 68 }, |
| 67 }); | 69 }); |
| OLD | NEW |