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

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

Issue 1842403004: MD Settings: Certificate manager, move "Import" button to the tab level. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comment. Created 4 years, 8 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_subentry.js
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
index 07c2ab953f337890b43a564b57cb99f20a00ed18..b1340bc031303e53fff6eb2928707fb42166f357 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_subentry.js
@@ -12,7 +12,7 @@
* component.
* @typedef {{
* action: !settings.CertificateAction,
- * subnode: !CertificateSubnode,
+ * subnode: ?CertificateSubnode,
* certificateType: !settings.CertificateType
* }}
*/
@@ -27,8 +27,7 @@ cr.define('settings', function() {
DELETE: 0,
EDIT: 1,
EXPORT_PERSONAL: 2,
- IMPORT_CA: 3,
- IMPORT_PERSONAL: 4,
+ IMPORT: 3,
};
/**
@@ -81,7 +80,7 @@ Polymer({
/**
* Handles the case where a call to the browser resulted in a rejected
* promise.
- * @param {null|!CertificatesError|!CertificatesImportError} error
+ * @param {?CertificatesError} error
* @private
*/
onRejected_: function(error) {
@@ -141,32 +140,6 @@ Polymer({
}
},
- /** @private */
- onImportTap_: function() {
- this.closePopupMenu_();
- if (this.certificateType == settings.CertificateType.PERSONAL) {
- // TODO(dpapad): Figure out when to pass true (ChromeOS?).
- this.browserProxy_.importPersonalCertificate(false).then(
- function(showPasswordPrompt) {
- if (showPasswordPrompt) {
- this.dispatchCertificateActionEvent_(
- settings.CertificateAction.IMPORT_PERSONAL);
- }
- }.bind(this),
- this.onRejected_.bind(this));
- } else if (this.certificateType == settings.CertificateType.CA) {
- this.browserProxy_.importCaCertificate().then(
- function(certificateName) {
- this.dispatchCertificateActionEvent_(
- settings.CertificateAction.IMPORT_CA);
- }.bind(this),
- this.onRejected_.bind(this));
- } else if (this.certificateType == settings.CertificateType.SERVER) {
- this.browserProxy_.importServerCertificate().catch(
- this.onRejected_.bind(this));
- }
- },
-
/**
* @param {string} certificateType The type of this certificate.
* @return {boolean} Whether the certificate can be edited.
@@ -176,15 +149,6 @@ Polymer({
return this.certificateType == settings.CertificateType.CA;
},
- /**
- * @param {string} certificateType The type of this certificate.
- * @return {boolean} Whether a certificate can be imported.
- * @private
- */
- canImport_: function(certificateType) {
- return this.certificateType != settings.CertificateType.OTHER;
- },
-
/** @private */
closePopupMenu_: function() {
this.$$('iron-dropdown').close();

Powered by Google App Engine
This is Rietveld 408576698