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

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

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial draft Created 5 years 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/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index c0bcd671f7f05136387b47166770c29b76c1012c..0bfb82e8b9ca58fbac0c427e65d2d373474349ce 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -850,7 +850,7 @@ void AutofillManager::OnDidGetUploadDetails(
client_->ConfirmSaveCreditCardToCloud(
base::Bind(&AutofillManager::OnUserDidAcceptUpload,
weak_ptr_factory_.GetWeakPtr()),
- std::move(legal_message));
+ upload_request_.card, std::move(legal_message));
client_->LoadRiskData(base::Bind(&AutofillManager::OnDidGetUploadRiskData,
weak_ptr_factory_.GetWeakPtr()));
AutofillMetrics::LogCardUploadDecisionMetric(
@@ -867,9 +867,11 @@ void AutofillManager::OnDidGetUploadDetails(
// the upload details request will consistently fail and if we don't fall
// back to a local save then the user will never be offered any kind of
// credit card save.
- client_->ConfirmSaveCreditCardLocally(base::Bind(
- base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard),
- base::Unretained(personal_data_), upload_request_.card));
+ client_->ConfirmSaveCreditCardLocally(
+ base::Bind(
+ base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard),
+ base::Unretained(personal_data_), upload_request_.card),
+ upload_request_.card);
AutofillMetrics::LogCardUploadDecisionMetric(
AutofillMetrics::UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED);
}
@@ -973,9 +975,11 @@ void AutofillManager::ImportFormData(const FormStructure& submitted_form) {
upload_request_ = payments::PaymentsClient::UploadRequestDetails();
if (!IsCreditCardUploadEnabled()) {
- client_->ConfirmSaveCreditCardLocally(base::Bind(
- base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard),
- base::Unretained(personal_data_), *imported_credit_card));
+ client_->ConfirmSaveCreditCardLocally(
+ base::Bind(
+ base::IgnoreResult(&PersonalDataManager::SaveImportedCreditCard),
+ base::Unretained(personal_data_), *imported_credit_card),
+ *imported_credit_card);
} else {
// Check for a CVC in order to determine whether we can prompt the user to
// upload their card.

Powered by Google App Engine
This is Rietveld 408576698