OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 /** | |
6 * @fileoverview A dialog for showing SSL certificate related error messages. | |
7 * The user can only close the dialog, there is no other possible intercation. | |
tommycli
2016/03/17 19:14:19
nit: possible interaction.
dpapad
2016/03/17 22:19:45
Done.
| |
8 */ | |
9 Polymer({ | |
10 is: 'settings-certificates-error-dialog', | |
11 | |
12 properties: { | |
13 /** @type {!CertificatesError|!CertificatesImportError} */ | |
14 model: Object, | |
15 }, | |
16 | |
17 /** @override */ | |
18 attached: function() { | |
19 this.$.dialog.open(); | |
tommycli
2016/03/17 19:14:19
Not a big fan of the open on attached model. It se
dpapad
2016/03/17 22:19:45
The usage of model of those dialogs will become cl
tommycli
2016/03/17 22:37:42
Yes, I am looking forward to it trololol.
| |
20 }, | |
21 | |
22 /** @private */ | |
23 close_: function() { | |
tommycli
2016/03/17 19:14:19
nit: as mentioned before, probably rename to onOkT
dpapad
2016/03/17 22:19:45
Done.
| |
24 this.$.dialog.close(); | |
25 }, | |
26 | |
27 /** | |
28 * @param {{certificateName: string, error: string}} importError | |
29 * @return {string} | |
30 * @private | |
31 */ | |
32 getCertificateErrorText_: function(importError) { | |
33 return loadTimeData.getStringF( | |
34 'certificateImportErrorFormat', | |
35 importError.certificateName, importError.error); | |
36 }, | |
37 }); | |
OLD | NEW |