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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: Rebasing the fixes... Created 3 years, 10 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: 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;
}
}

Powered by Google App Engine
This is Rietveld 408576698