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

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

Issue 2946563002: Run clang-format on .js files in c/b/r/settings (Closed)
Patch Set: dschuyler@ review Created 3 years, 6 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).then( 110 this.browserProxy_.exportPersonalCertificate(this.model.id)
111 function() { 111 .then(function() {
112 this.dispatchCertificateActionEvent_( 112 this.dispatchCertificateActionEvent_(
113 CertificateAction.EXPORT_PERSONAL); 113 CertificateAction.EXPORT_PERSONAL);
114 }.bind(this), 114 }.bind(this), this.onRejected_.bind(this));
115 this.onRejected_.bind(this));
116 } else { 115 } else {
117 this.browserProxy_.exportCertificate(this.model.id); 116 this.browserProxy_.exportCertificate(this.model.id);
118 } 117 }
119 }, 118 },
120 119
121 /** 120 /**
122 * @param {!CertificateType} certificateType 121 * @param {!CertificateType} certificateType
123 * @param {!CertificateSubnode} model 122 * @param {!CertificateSubnode} model
124 * @return {boolean} Whether the certificate can be edited. 123 * @return {boolean} Whether the certificate can be edited.
125 * @private 124 * @private
(...skipping 24 matching lines...) Expand all
150 return !model.readonly && !model.policy; 149 return !model.readonly && !model.policy;
151 }, 150 },
152 151
153 /** @private */ 152 /** @private */
154 closePopupMenu_: function() { 153 closePopupMenu_: function() {
155 this.$$('dialog[is=cr-action-menu]').close(); 154 this.$$('dialog[is=cr-action-menu]').close();
156 }, 155 },
157 156
158 /** @private */ 157 /** @private */
159 onDotsTap_: function() { 158 onDotsTap_: function() {
160 var actionMenu = /** @type {!CrActionMenuElement} */( 159 var actionMenu = /** @type {!CrActionMenuElement} */ (this.$.menu.get());
161 this.$.menu.get());
162 actionMenu.showAt(this.$.dots); 160 actionMenu.showAt(this.$.dots);
163 }, 161 },
164 }); 162 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698