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 a406722453f5f1952f3440084a4c87702f846527..152e6de577e1d7a25a340324561f48f941fd49e5 100644 |
| --- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp |
| @@ -45,7 +45,7 @@ struct TypeConverter<CurrencyAmountPtr, blink::CurrencyAmount> { |
| static CurrencyAmountPtr Convert(const blink::CurrencyAmount& input) |
| { |
| CurrencyAmountPtr output = CurrencyAmount::New(); |
| - output->currency_code = input.currencyCode(); |
| + output->currency_code = input.currency(); |
| output->value = input.value(); |
| return output; |
| } |
| @@ -125,7 +125,7 @@ void validateShippingOptionsOrPaymentItems(HeapVector<T> items, ExceptionState& |
| return; |
| } |
| - if (!item.amount().hasCurrencyCode()) { |
| + if (!item.amount().hasCurrency()) { |
| exceptionState.throwTypeError("Currency code required"); |
| return; |
| } |
| @@ -135,7 +135,7 @@ void validateShippingOptionsOrPaymentItems(HeapVector<T> items, ExceptionState& |
| return; |
| } |
| - if (!PaymentsValidators::isValidCurrencyCodeFormat(item.amount().currencyCode(), &errorMessage)) { |
| + if (!PaymentsValidators::isValidCurrencyCodeFormat(item.amount().currency(), &errorMessage)) { |
|
Marijn Kruisselbrink
2016/05/16 19:02:48
To really make this match the spec you probably sh
please use gerrit instead
2016/05/16 21:36:36
We would also need to update the validation logic
Marijn Kruisselbrink
2016/05/16 21:43:48
Sure, that works. And to fully match the spec chan
|
| exceptionState.throwTypeError(errorMessage); |
| return; |
| } |