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

Side by Side Diff: chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.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 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 settings-certificate-subentry represents an SSL certificate 6 * @fileoverview settings-certificate-subentry represents an SSL certificate
7 * sub-entry. 7 * sub-entry.
8 */ 8 */
9 9
10 cr.define('settings', function() { 10 cr.define('settings', function() {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 this.dispatchCertificateActionEvent_(CertificateAction.DELETE); 100 this.dispatchCertificateActionEvent_(CertificateAction.DELETE);
101 }, 101 },
102 102
103 /** 103 /**
104 * @param {!Event} event 104 * @param {!Event} event
105 * @private 105 * @private
106 */ 106 */
107 onExportTap_: function(event) { 107 onExportTap_: function(event) {
108 this.closePopupMenu_(); 108 this.closePopupMenu_();
109 if (this.certificateType == CertificateType.PERSONAL) { 109 if (this.certificateType == CertificateType.PERSONAL) {
110 this.browserProxy_.exportPersonalCertificate(this.model.id) 110 this.browserProxy_.exportPersonalCertificate(this.model.id).then(() => {
111 .then(function() { 111 this.dispatchCertificateActionEvent_(CertificateAction.EXPORT_PERSONAL);
112 this.dispatchCertificateActionEvent_( 112 }, this.onRejected_.bind(this));
113 CertificateAction.EXPORT_PERSONAL);
114 }.bind(this), this.onRejected_.bind(this));
115 } else { 113 } else {
116 this.browserProxy_.exportCertificate(this.model.id); 114 this.browserProxy_.exportCertificate(this.model.id);
117 } 115 }
118 }, 116 },
119 117
120 /** 118 /**
121 * @param {!CertificateType} certificateType 119 * @param {!CertificateType} certificateType
122 * @param {!CertificateSubnode} model 120 * @param {!CertificateSubnode} model
123 * @return {boolean} Whether the certificate can be edited. 121 * @return {boolean} Whether the certificate can be edited.
124 * @private 122 * @private
(...skipping 28 matching lines...) Expand all
153 closePopupMenu_: function() { 151 closePopupMenu_: function() {
154 this.$$('dialog[is=cr-action-menu]').close(); 152 this.$$('dialog[is=cr-action-menu]').close();
155 }, 153 },
156 154
157 /** @private */ 155 /** @private */
158 onDotsTap_: function() { 156 onDotsTap_: function() {
159 var actionMenu = /** @type {!CrActionMenuElement} */ (this.$.menu.get()); 157 var actionMenu = /** @type {!CrActionMenuElement} */ (this.$.menu.get());
160 actionMenu.showAt(this.$.dots); 158 actionMenu.showAt(this.$.dots);
161 }, 159 },
162 }); 160 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698