| 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 53dea7a1dd1f7c63b960d7cc560414349432d1e5..fb04559b30ac56104c0ec7e55e77fe3376852b6a 100644
|
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
|
| @@ -129,39 +129,49 @@ static const int completeTimeoutSeconds = 60;
|
| // Validates ShippingOption or PaymentItem, which happen to have identical
|
| // fields, except for "id", which is present only in ShippingOption.
|
| template <typename T>
|
| -void validateShippingOptionOrPaymentItem(const T& item,
|
| - ExceptionState& exceptionState) {
|
| - if (!item.hasLabel() || item.label().isEmpty()) {
|
| - exceptionState.throwTypeError("Item label required");
|
| +void ValidateShippingOptionOrPaymentItem(const T& item,
|
| + ExceptionState& exception_state) {
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |hasLabel| and |label| below. */
|
| + if (!item.hasLabel() || item.label().IsEmpty()) {
|
| + exception_state.ThrowTypeError("Item label required");
|
| return;
|
| }
|
|
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |hasAmount| below. */
|
| if (!item.hasAmount()) {
|
| - exceptionState.throwTypeError("Currency amount required");
|
| + exception_state.ThrowTypeError("Currency amount required");
|
| return;
|
| }
|
|
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |amount| below. */
|
| if (!item.amount().hasCurrency()) {
|
| - exceptionState.throwTypeError("Currency code required");
|
| + exception_state.ThrowTypeError("Currency code required");
|
| return;
|
| }
|
|
|
| if (!item.amount().hasValue()) {
|
| - exceptionState.throwTypeError("Currency value required");
|
| + exception_state.ThrowTypeError("Currency value required");
|
| return;
|
| }
|
|
|
| - String errorMessage;
|
| - if (!PaymentsValidators::isValidCurrencyCodeFormat(
|
| + String error_message;
|
| + if (!PaymentsValidators::IsValidCurrencyCodeFormat(
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |amount| below. */
|
| item.amount().currency(), item.amount().currencySystem(),
|
| - &errorMessage)) {
|
| - exceptionState.throwTypeError(errorMessage);
|
| + &error_message)) {
|
| + exception_state.ThrowTypeError(error_message);
|
| return;
|
| }
|
|
|
| - if (!PaymentsValidators::isValidAmountFormat(item.amount().value(),
|
| - &errorMessage)) {
|
| - exceptionState.throwTypeError(errorMessage);
|
| + /* DO NOT SUBMIT - merge conflict marker.
|
| + * Please spell |amount| below. */
|
| + if (!PaymentsValidators::IsValidAmountFormat(item.amount().value(),
|
| + &error_message)) {
|
| + exception_state.ThrowTypeError(error_message);
|
| return;
|
| }
|
| }
|
|
|