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

Unified Diff: components/payments/content/payment_request.cc

Issue 2725963002: [Payments] Only show the required rows in the Payment Request dialog (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « components/payments/content/payment_request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request.cc
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
index f7ed68d8c90b85a1448d7fdf9277a6474270f9d4..e55e68b272a5ec75112dfe572c94fadd4b8f4389 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -298,19 +298,19 @@ bool PaymentRequest::ArePaymentDetailsSatisfied() {
bool PaymentRequest::ArePaymentOptionsSatisfied() {
// TODO(mathp): Have a measure of shipping address completeness.
- if (options_->request_shipping && selected_shipping_profile_ == nullptr)
+ if (request_shipping() && selected_shipping_profile_ == nullptr)
return false;
// TODO(mathp): Make an encompassing class to validate contact info.
const std::string& app_locale = delegate_->GetApplicationLocale();
- if (options_->request_payer_name &&
+ if (request_payer_name() &&
(selected_contact_profile_ == nullptr ||
selected_contact_profile_
->GetInfo(autofill::AutofillType(autofill::NAME_FULL), app_locale)
.empty())) {
return false;
}
- if (options_->request_payer_email &&
+ if (request_payer_email() &&
(selected_contact_profile_ == nullptr ||
selected_contact_profile_
->GetInfo(autofill::AutofillType(autofill::EMAIL_ADDRESS),
@@ -318,7 +318,7 @@ bool PaymentRequest::ArePaymentOptionsSatisfied() {
.empty())) {
return false;
}
- if (options_->request_payer_phone &&
+ if (request_payer_phone() &&
(selected_contact_profile_ == nullptr ||
selected_contact_profile_
->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER),
« no previous file with comments | « components/payments/content/payment_request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698