Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f14507df955250ee2ef3555d5139518d4457c355 |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.browser.payments; |
| + |
| +import org.chromium.base.annotations.JNINamespace; |
| +import org.chromium.payments.mojom.PaymentDetails; |
| + |
| +import java.nio.ByteBuffer; |
| + |
| +/** |
| + * Static class to represent a JNI interface to a C++ validation library. |
| + */ |
| +@JNINamespace("payments") |
| +public class PaymentValidator { |
| + public static boolean validatePaymentDetails(PaymentDetails details) { |
| + if (details == null) { |
|
please use gerrit instead
2016/10/31 14:31:15
Formatting nit: Chrome's Android code usually inli
Kevin Bailey
2016/10/31 20:32:00
Interesting. How would you set a breakpoint on the
|
| + return false; |
| + } |
| + return nativeValidatePaymentDetails(details.serialize()); |
| + } |
| + |
| + private static native boolean nativeValidatePaymentDetails(ByteBuffer buffer); |
| +}; |