Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.net; | |
| 6 | |
| 7 import org.chromium.base.annotations.JNINamespace; | |
| 8 | |
| 9 /** | |
| 10 * A Java wrapper to supply a net::MockCertVerifier which can be then passed | |
| 11 * 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.
| |
| 12 * freed when CronetEngine is torn down. | |
|
pauljensen
2015/10/20 13:53:58
CronetEngine->the CronetEngine
xunjieli
2015/10/20 15:23:11
Done.
| |
| 13 */ | |
| 14 @JNINamespace("cronet") | |
| 15 public class MockCertVerifier { | |
| 16 private MockCertVerifier() {} | |
| 17 | |
| 18 /** | |
| 19 * Creates a new net::MockCertVerifier, and returns a pointer to it. | |
| 20 * @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.
| |
| 21 */ | |
| 22 public static long getNativePointer(String[] certs) { | |
| 23 return nativeCreateMockCertVerifier(certs); | |
| 24 } | |
| 25 | |
| 26 private static native long nativeCreateMockCertVerifier(String[] certs); | |
| 27 } | |
| OLD | NEW |