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 A dialog prompting the user for a decryption password such that | 6 * @fileoverview A dialog prompting the user for a decryption password such that |
7 * a previously exported personal certificate can be imported. | 7 * a previously exported personal certificate can be imported. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-certificate-password-decryption-dialog', | 10 is: 'settings-certificate-password-decryption-dialog', |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 /** @private */ | 33 /** @private */ |
34 onCancelTap_: function() { | 34 onCancelTap_: function() { |
35 /** @type {!CrDialogElement} */ (this.$.dialog).close(); | 35 /** @type {!CrDialogElement} */ (this.$.dialog).close(); |
36 }, | 36 }, |
37 | 37 |
38 /** @private */ | 38 /** @private */ |
39 onOkTap_: function() { | 39 onOkTap_: function() { |
40 this.browserProxy_.importPersonalCertificatePasswordSelected(this.password_) | 40 this.browserProxy_.importPersonalCertificatePasswordSelected(this.password_) |
41 .then( | 41 .then( |
42 function() { | 42 () => { |
43 /** @type {!CrDialogElement} */ (this.$.dialog).close(); | 43 /** @type {!CrDialogElement} */ (this.$.dialog).close(); |
44 }.bind(this), | 44 }, |
45 /** @param {!CertificatesError} error */ | 45 error => { |
46 function(error) { | |
47 /** @type {!CrDialogElement} */ (this.$.dialog).close(); | 46 /** @type {!CrDialogElement} */ (this.$.dialog).close(); |
48 this.fire('certificates-error', {error: error, anchor: null}); | 47 this.fire('certificates-error', {error: error, anchor: null}); |
49 }.bind(this)); | 48 }); |
50 }, | 49 }, |
51 }); | 50 }); |
OLD | NEW |