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

Side by Side Diff: chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
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 for showing SSL certificate related error messages. 6 * @fileoverview A dialog for showing SSL certificate related error messages.
7 * The user can only close the dialog, there is no other possible interaction. 7 * The user can only close the dialog, there is no other possible interaction.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-certificates-error-dialog', 10 is: 'settings-certificates-error-dialog',
11 11
12 properties: { 12 properties: {
13 /** @type {!CertificatesError|!CertificatesImportError} */ 13 /** @type {!CertificatesError|!CertificatesImportError} */
14 model: Object, 14 model: Object,
15 }, 15 },
16 16
17 /** @override */ 17 /** @override */
18 attached: function() { 18 attached: function() {
19 /** @type {!CrDialogElement} */ (this.$.dialog).open(); 19 /** @type {!CrDialogElement} */ (this.$.dialog).showModal();
20 }, 20 },
21 21
22 /** @private */ 22 /** @private */
23 onOkTap_: function() { 23 onOkTap_: function() {
24 /** @type {!CrDialogElement} */ (this.$.dialog).close(); 24 /** @type {!CrDialogElement} */ (this.$.dialog).close();
25 }, 25 },
26 26
27 /** 27 /**
28 * @param {{name: string, error: string}} importError 28 * @param {{name: string, error: string}} importError
29 * @return {string} 29 * @return {string}
30 * @private 30 * @private
31 */ 31 */
32 getCertificateErrorText_: function(importError) { 32 getCertificateErrorText_: function(importError) {
33 return loadTimeData.getStringF( 33 return loadTimeData.getStringF(
34 'certificateImportErrorFormat', importError.name, importError.error); 34 'certificateImportErrorFormat', importError.name, importError.error);
35 }, 35 },
36 }); 36 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698