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

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

Issue 2413533003: [Payments] Normalize billing address before sending to the merchant. (Closed)
Patch Set: Created 4 years, 2 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 ace4f444c181eee328349c6e30db36927665aa9e..ba13b342bdf8a57330595eb55db1a9e5518ae953 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -693,6 +693,21 @@ void PersonalDataManager::AddServerCreditCardForTest(
server_credit_cards_.push_back(credit_card.release());
}
+void PersonalDataManager::UpdateCreditCardForTest(
+ const CreditCard& credit_card) {
+ if (credit_card.record_type() == CreditCard::LOCAL_CARD)
+ database_->UpdateCreditCard(credit_card);
+ else
+ database_->UpdateServerCardUsageStats(credit_card);
+}
+
+void PersonalDataManager::UpdateProfileForTest(const AutofillProfile& profile) {
+ if (profile.record_type() == AutofillProfile::LOCAL_PROFILE)
+ database_->UpdateAutofillProfile(profile);
+ else if (profile.record_type() == AutofillProfile::SERVER_PROFILE)
+ database_->UpdateServerAddressUsageStats(profile);
+}
+
void PersonalDataManager::RemoveByGUID(const std::string& guid) {
if (is_off_the_record_)
return;

Powered by Google App Engine
This is Rietveld 408576698