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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java

Issue 2373103002: [Web Payments] Common Payments validation (Closed)
Patch Set: Deps 2 Created 4 years, 2 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: 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..d9200eb244c0856ed38e6a280ac8c799ca080357
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentValidator.java
@@ -0,0 +1,22 @@
+// 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) {
+ return nativeValidatePaymentDetails(details.serialize());
+ }
+
+ private static native boolean nativeValidatePaymentDetails(ByteBuffer buffer);
+};

Powered by Google App Engine
This is Rietveld 408576698