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

Unified Diff: chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js

Issue 1812673002: MD Settings: Certificate manager, error dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@certificate_decrypt_dialog
Patch Set: Add missing dependency Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js b/chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js
new file mode 100644
index 0000000000000000000000000000000000000000..02b7abcae8af0843dc2abde2d87e41698bc9a4bb
--- /dev/null
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js
@@ -0,0 +1,37 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview A dialog for showing SSL certificate related error messages.
+ * 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.
+ */
+Polymer({
+ is: 'settings-certificates-error-dialog',
+
+ properties: {
+ /** @type {!CertificatesError|!CertificatesImportError} */
+ model: Object,
+ },
+
+ /** @override */
+ attached: function() {
+ 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.
+ },
+
+ /** @private */
+ 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.
+ this.$.dialog.close();
+ },
+
+ /**
+ * @param {{certificateName: string, error: string}} importError
+ * @return {string}
+ * @private
+ */
+ getCertificateErrorText_: function(importError) {
+ return loadTimeData.getStringF(
+ 'certificateImportErrorFormat',
+ importError.certificateName, importError.error);
+ },
+});

Powered by Google App Engine
This is Rietveld 408576698