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

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

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 5 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/ca_trust_edit_dialog.js
diff --git a/chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js b/chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js
index 92d2f241103a9d1ee03ad15ac9a4f4baa300253b..38443b6796d8a8fa6e0f1f2893b4b5434c6a28b4 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js
+++ b/chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js
@@ -39,12 +39,10 @@ Polymer({
// imported, otherwise an existing certificate is being edited.
if (this.model.id) {
this.browserProxy_.getCaCertificateTrust(this.model.id)
- .then(
- /** @param {!CaTrustInfo} trustInfo */
- function(trustInfo) {
- this.trustInfo_ = trustInfo;
- this.$.dialog.showModal();
- }.bind(this));
+ .then(trustInfo => {
+ this.trustInfo_ = trustInfo;
+ this.$.dialog.showModal();
+ });
} else {
/** @type {!CrDialogElement} */ (this.$.dialog).showModal();
}
@@ -67,14 +65,13 @@ Polymer({
this.$.ssl.checked, this.$.email.checked, this.$.objSign.checked);
whenDone.then(
- function() {
+ () => {
this.$.spinner.active = false;
/** @type {!CrDialogElement} */ (this.$.dialog).close();
- }.bind(this),
- /** @param {!CertificatesError} error */
- function(error) {
+ },
+ error => {
/** @type {!CrDialogElement} */ (this.$.dialog).close();
this.fire('certificates-error', {error: error, anchor: null});
- }.bind(this));
+ });
},
});

Powered by Google App Engine
This is Rietveld 408576698