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

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: . 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 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;

Powered by Google App Engine
This is Rietveld 408576698