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

Unified Diff: components/cronet/android/test/src/org/chromium/net/MockCertVerifier.java

Issue 1389213003: [Cronet] Use Https for Quic Test Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ryancl
Patch Set: Address Paul's comments Created 5 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: components/cronet/android/test/src/org/chromium/net/MockCertVerifier.java
diff --git a/components/cronet/android/test/src/org/chromium/net/MockCertVerifier.java b/components/cronet/android/test/src/org/chromium/net/MockCertVerifier.java
new file mode 100644
index 0000000000000000000000000000000000000000..c98b0956d98262f2ef6e73f48becda9561ae6f46
--- /dev/null
+++ b/components/cronet/android/test/src/org/chromium/net/MockCertVerifier.java
@@ -0,0 +1,27 @@
+// Copyright 2015 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.net;
+
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * A Java wrapper to supply a net::MockCertVerifier which can be then passed
+ * into {@link CronetEngine.Builder} for testing. The native pointer will be
pauljensen 2015/10/20 13:53:58 Builder->Builder#setMockCertVerifierForTesting
xunjieli 2015/10/20 15:23:11 Done.
+ * freed when CronetEngine is torn down.
pauljensen 2015/10/20 13:53:58 CronetEngine->the CronetEngine
xunjieli 2015/10/20 15:23:11 Done.
+ */
+@JNINamespace("cronet")
+public class MockCertVerifier {
+ private MockCertVerifier() {}
+
+ /**
+ * Creates a new net::MockCertVerifier, and returns a pointer to it.
+ * @param certs a String array of certs to accept in testing.
pauljensen 2015/10/20 13:53:58 Please document that these are actually filenames
xunjieli 2015/10/20 15:23:11 Done.
+ */
+ public static long getNativePointer(String[] certs) {
+ return nativeCreateMockCertVerifier(certs);
+ }
+
+ private static native long nativeCreateMockCertVerifier(String[] certs);
+}

Powered by Google App Engine
This is Rietveld 408576698