Index: chrome/browser/payments/payment_request_impl.cc |
diff --git a/chrome/browser/payments/payment_request_impl.cc b/chrome/browser/payments/payment_request_impl.cc |
index 743ab19e26bf7dad196d9ced28889fdbc322523d..aa7121f67da5c8712a0798393d8b613871034bb3 100644 |
--- a/chrome/browser/payments/payment_request_impl.cc |
+++ b/chrome/browser/payments/payment_request_impl.cc |
@@ -8,6 +8,7 @@ |
#include "base/lazy_instance.h" |
#include "chrome/browser/ui/browser_dialogs.h" |
+#include "components/payments/payment_details_validation.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/web_contents.h" |
@@ -61,7 +62,13 @@ void PaymentRequestImpl::Init( |
payments::mojom::PaymentDetailsPtr details, |
payments::mojom::PaymentOptionsPtr options) { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
+ std::string error; |
+ if (!payments::validatePaymentDetails(details, &error)) { |
please use gerrit instead
2017/01/04 19:17:11
LOG(ERROR) << error;
anthonyvd
2017/01/05 16:45:42
Done.
|
+ OnError(); |
+ return; |
+ } |
client_ = std::move(client); |
+ details_ = std::move(details); |
} |
void PaymentRequestImpl::Show() { |