| Index: chrome/browser/resources/settings/certificate_manager_page/certificate_list.js
|
| diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_list.js b/chrome/browser/resources/settings/certificate_manager_page/certificate_list.js
|
| index f9b7b020fbeb973a500ed6078b89ac3902d14e90..82b261fd8cd1e92346d04facebc4549300248a05 100644
|
| --- a/chrome/browser/resources/settings/certificate_manager_page/certificate_list.js
|
| +++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_list.js
|
| @@ -52,6 +52,16 @@ Polymer({
|
| return this.certificateType != CertificateType.OTHER;
|
| },
|
|
|
| +// <if expr="chromeos">
|
| + /**
|
| + * @return {boolean}
|
| + * @private
|
| + */
|
| + canImportAndBind_: function() {
|
| + return this.certificateType == CertificateType.PERSONAL;
|
| + },
|
| +// </if>
|
| +
|
| /**
|
| * Handles a rejected Promise returned from |browserProxy_|.
|
| * @param {*} error Expects {!CertificatesError|!CertificatesImportError}.
|
| @@ -86,9 +96,24 @@ Polymer({
|
|
|
| /** @private */
|
| onImportTap_: function() {
|
| + this.handleImport_(false);
|
| + },
|
| +
|
| +// <if expr="chromeos">
|
| + /** @private */
|
| + onImportAndBindTap_: function() {
|
| + this.handleImport_(true);
|
| + },
|
| +// </if>
|
| +
|
| + /**
|
| + * @param {boolean} useHardwareBacked
|
| + * @private
|
| + */
|
| + handleImport_: function(useHardwareBacked) {
|
| var browserProxy = settings.CertificatesBrowserProxyImpl.getInstance();
|
| if (this.certificateType == CertificateType.PERSONAL) {
|
| - browserProxy.importPersonalCertificate(false).then(
|
| + browserProxy.importPersonalCertificate(useHardwareBacked).then(
|
| function(showPasswordPrompt) {
|
| if (showPasswordPrompt)
|
| this.dispatchImportActionEvent_(null);
|
|
|