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 ae6bbeda18c0d4719700bd403a44682f8458d6a0..bc1eddc7430d264d76364bb65acf3ca0b3bc9151 100644 |
--- a/components/autofill/core/browser/personal_data_manager.cc |
+++ b/components/autofill/core/browser/personal_data_manager.cc |
@@ -665,6 +665,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; |
please use gerrit instead
2015/03/12 20:40:12
Nit: "return" here and "NOTREACHED()" after the lo
Evan Stade
2015/03/12 21:28:03
the general pattern in PDM is to fail silently if
|
+ } |
+ } |
+} |
+ |
void PersonalDataManager::ResetFullServerCards() { |
for (const CreditCard* card : server_credit_cards_) { |
CreditCard card_copy = *card; |