| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.os.ConditionVariable; | 7 import android.os.ConditionVariable; |
| 8 | 8 |
| 9 import org.chromium.base.annotations.CalledByNative; | 9 import org.chromium.base.annotations.CalledByNative; |
| 10 import org.chromium.base.annotations.JNINamespace; | 10 import org.chromium.base.annotations.JNINamespace; |
| 11 import org.chromium.net.impl.ChromiumUrlRequestFactory; |
| 12 import org.chromium.net.impl.CronetUrlRequest; |
| 13 import org.chromium.net.impl.CronetUrlRequestContext; |
| 11 | 14 |
| 12 /** | 15 /** |
| 13 * Utilities for Cronet testing | 16 * Utilities for Cronet testing |
| 14 */ | 17 */ |
| 15 @JNINamespace("cronet") | 18 @JNINamespace("cronet") |
| 16 public class CronetTestUtil { | 19 public class CronetTestUtil { |
| 17 private static final ConditionVariable sHostResolverBlock = new ConditionVar
iable(); | 20 private static final ConditionVariable sHostResolverBlock = new ConditionVar
iable(); |
| 18 | 21 |
| 19 /** | 22 /** |
| 20 * Registers customized DNS mapping for testing host names used by test serv
ers, namely: | 23 * Registers customized DNS mapping for testing host names used by test serv
ers, namely: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 @CalledByNative | 62 @CalledByNative |
| 60 private static void onHostResolverProcRegistered() { | 63 private static void onHostResolverProcRegistered() { |
| 61 sHostResolverBlock.open(); | 64 sHostResolverBlock.open(); |
| 62 } | 65 } |
| 63 | 66 |
| 64 private static native void nativeRegisterHostResolverProc( | 67 private static native void nativeRegisterHostResolverProc( |
| 65 long contextAdapter, boolean isLegacyAPI, String destination); | 68 long contextAdapter, boolean isLegacyAPI, String destination); |
| 66 | 69 |
| 67 private static native int nativeGetLoadFlags(long urlRequest); | 70 private static native int nativeGetLoadFlags(long urlRequest); |
| 68 } | 71 } |
| OLD | NEW |