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

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

Issue 2092323002: [MD Settings] Add a menu option to clear a cached credit card. (Closed) Base URL: hcarmona0.lax.corp.google.com:/usr/local/google/home/hcarmona/src@cc-clear-cache.gitbr
Patch Set: nit Created 4 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
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 4807235331338b639f5131c48160fe078a2fcec7..001cc0dd2c4fe74f5985d4161e0b3d8c9543f83e 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
@@ -119,6 +119,7 @@
var creditCard = /** @type {!chrome.autofillPrivate.CreditCardEntry} */(
menuEvent.model.item);
this.$.menuRemoveCreditCard.hidden = !creditCard.metadata.isLocal;
+ this.$.menuClearCreditCard.hidden = !creditCard.metadata.isCached;
this.$.creditCardSharedMenu.toggleMenu(
Polymer.dom(e).localTarget, creditCard);
e.stopPropagation(); // Prevent the tap event from closing the menu.
@@ -168,6 +169,16 @@
},
/**
+ * Handles tapping on the "Clear copy" button for cached credit cards.
+ * @private
+ */
+ onMenuClearCreditCardTap_: function() {
+ var menu = this.$.creditCardSharedMenu;
+ this.fire('clear-credit-card', menu.itemData);
+ menu.closeMenu();
+ },
+
+ /**
* Closes the overflow menus.
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698