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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 996973003: Revamp Autofill Wallet settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac compiles Created 5 years, 9 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: components/autofill/core/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index 87f377cd4ae9398c4f18fe39611e232365109f08..cc27e9276fde367946afc6fd1d1c2c3bc86543a5 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -671,6 +671,19 @@ void PersonalDataManager::UpdateServerCreditCard(
Refresh();
}
+void PersonalDataManager::ResetFullServerCard(const std::string& guid) {
+ for (const CreditCard* card : server_credit_cards_) {
+ if (card->guid() == guid) {
+ DCHECK_EQ(card->record_type(), CreditCard::FULL_SERVER_CARD);
+ CreditCard card_copy = *card;
+ card_copy.set_record_type(CreditCard::MASKED_SERVER_CARD);
+ card_copy.SetNumber(card->LastFourDigits());
+ UpdateServerCreditCard(card_copy);
+ break;
+ }
+ }
+}
+
void PersonalDataManager::ResetFullServerCards() {
for (const CreditCard* card : server_credit_cards_) {
CreditCard card_copy = *card;

Powered by Google App Engine
This is Rietveld 408576698