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

Unified Diff: chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_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/certificate_delete_confirmation_dialog.js
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.js b/chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.js
index 6abeecef1d92be65924e7ff5505709aaa2d1c0e2..b5dcd6779d0db93a24775714e246bc2a38a3e53b 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.js
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.js
@@ -39,9 +39,8 @@ Polymer({
* @param {string} localizedMessageId
* @return {string}
*/
- var getString = function(localizedMessageId) {
- return loadTimeData.getStringF(localizedMessageId, this.model.name);
- }.bind(this);
+ var getString = localizedMessageId =>
+ loadTimeData.getStringF(localizedMessageId, this.model.name);
switch (this.certificateType) {
case CertificateType.PERSONAL:
@@ -84,13 +83,12 @@ Polymer({
onOkTap_: function() {
this.browserProxy_.deleteCertificate(this.model.id)
.then(
- function() {
+ () => {
/** @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