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

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

Issue 2780773004: Reland "PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate." (Closed)
Patch Set: Reland "PaymentRequest: Introduce PaymentDetailsInit and PaymentDetailsUpdate." Created 3 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/payments/content/payment_request.cc
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
index ed48db057bf30588400e06c8a5f6d8b336445309..d748039c31300aaa8fe8c7ac3d8d05463c801a17 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -48,6 +48,11 @@ void PaymentRequest::Init(
OnConnectionTerminated();
return;
}
+ if (!details->total) {
+ LOG(ERROR) << "Missing total";
+ OnConnectionTerminated();
+ return;
+ }
client_ = std::move(client);
spec_ = base::MakeUnique<PaymentRequestSpec>(
std::move(options), std::move(details), std::move(method_data), this,
« no previous file with comments | « components/payments/content/payment_details_validation.cc ('k') | components/payments/content/payment_request.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698