Chromium Code Reviews| Index: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| index 63e221476b9c5d4619f63e40ddda08f1023310d6..82d48af061b76c94425b5aa889e2c85872d2e47f 100644 |
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| @@ -39,6 +39,7 @@ |
| #include "modules/payments/PaymentsValidators.h" |
| #include "mojo/public/cpp/bindings/interface_request.h" |
| #include "platform/RuntimeEnabledFeatures.h" |
| +#include "platform/UUID.h" |
| #include "platform/mojo/MojoHelper.h" |
| #include "public/platform/InterfaceProvider.h" |
| #include "public/platform/Platform.h" |
| @@ -521,6 +522,11 @@ void validateAndConvertPaymentDetailsInit(const PaymentDetailsInit& input, |
| return; |
| } |
| + if (!input.id().isEmpty()) |
|
please use gerrit instead
2017/03/27 16:22:36
The spec says non-normatively:
"If an id member i
rwlbuis
2017/03/27 20:45:29
Done.
|
| + output->id = input.id(); |
| + else |
| + output->id = createCanonicalUUIDString(); |
| + |
| validateAndConvertTotal(input.total(), output->total, exceptionState); |
| } |
| @@ -883,6 +889,8 @@ PaymentRequest::PaymentRequest(ExecutionContext* executionContext, |
| if (exceptionState.hadException()) |
| return; |
| + m_id = validatedDetails->id; |
| + |
| if (m_options.requestShipping()) |
| m_shippingType = getValidShippingType(m_options.shippingType()); |