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

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

Issue 2655583002: MD Settings: Certificates: Add 'Import and bind' button for CrOS (Closed)
Patch Set: Elim OS_CHROMEOS condition for certificateManagerImportAndBind to fix tests Created 3 years, 11 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_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);

Powered by Google App Engine
This is Rietveld 408576698