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

Unified Diff: chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js

Issue 2920223005: Allow clearing local CC details (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
index eda403181df3b4e5655c21f108deb058e8ea2e3f..3cfa7102bf39ec613367cfb284658088b593d54f 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js
@@ -386,7 +386,12 @@ AutofillManagerImpl.prototype = {
*/
onMenuEditCreditCardTap_: function(e) {
e.preventDefault();
- this.showCreditCardDialog_ = true;
+
+ if (this.activeCreditCard.metadata.isLocal)
+ this.showCreditCardDialog_ = true;
+ else
+ this.onRemoteEditCreditCardTap_();
+
this.$.creditCardSharedMenu.close();
},
@@ -415,6 +420,16 @@ AutofillManagerImpl.prototype = {
this.$.creditCardSharedMenu.close();
},
+ /**
+ * The 3-dot menu should not be shown if the card is entirely remote.
+ * @param {!chrome.autofillPrivate.AutofillMetadata} metadata
+ * @return {boolean}
+ * @private
+ */
+ showDots_: function(metadata) {
+ return !!(metadata.isLocal || metadata.isCached);
+ },
+
/**
* Returns true if the list exists and has items.
* @param {Array<Object>} list
« no previous file with comments | « chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698