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.content.Context; | 7 import android.content.Context; |
8 import android.os.ConditionVariable; | 8 import android.os.ConditionVariable; |
9 | 9 |
10 import org.chromium.base.CalledByNative; | 10 import org.chromium.base.CalledByNative; |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 | 33 |
34 /** | 34 /** |
35 * Registers customized DNS mapping for {@link NativeTestServer}. | 35 * Registers customized DNS mapping for {@link NativeTestServer}. |
36 * @param contextAdapter native context adapter object that this | 36 * @param contextAdapter native context adapter object that this |
37 * mapping should apply to. | 37 * mapping should apply to. |
38 * @param isLegacyAPI {@code true} if this context adapter is a part of the | 38 * @param isLegacyAPI {@code true} if this context adapter is a part of the |
39 * old API. | 39 * old API. |
40 */ | 40 */ |
41 public static void registerHostResolverProc(long contextAdapter, boolean isL
egacyAPI) { | 41 public static void registerHostResolverProc(long contextAdapter, boolean isL
egacyAPI) { |
42 sHostResolverBlock.close(); | |
43 nativeRegisterHostResolverProc(contextAdapter, isLegacyAPI); | 42 nativeRegisterHostResolverProc(contextAdapter, isLegacyAPI); |
44 sHostResolverBlock.block(); | 43 sHostResolverBlock.block(); |
| 44 sHostResolverBlock.close(); |
45 } | 45 } |
46 | 46 |
47 public static String getEchoBodyURL() { | 47 public static String getEchoBodyURL() { |
48 return nativeGetEchoBodyURL(); | 48 return nativeGetEchoBodyURL(); |
49 } | 49 } |
50 | 50 |
51 public static String getEchoHeaderURL(String header) { | 51 public static String getEchoHeaderURL(String header) { |
52 return nativeGetEchoHeaderURL(header); | 52 return nativeGetEchoHeaderURL(header); |
53 } | 53 } |
54 | 54 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 private static native String nativeGetEchoBodyURL(); | 111 private static native String nativeGetEchoBodyURL(); |
112 private static native String nativeGetEchoHeaderURL(String header); | 112 private static native String nativeGetEchoHeaderURL(String header); |
113 private static native String nativeGetEchoAllHeadersURL(); | 113 private static native String nativeGetEchoAllHeadersURL(); |
114 private static native String nativeGetEchoMethodURL(); | 114 private static native String nativeGetEchoMethodURL(); |
115 private static native String nativeGetRedirectToEchoBody(); | 115 private static native String nativeGetRedirectToEchoBody(); |
116 private static native String nativeGetFileURL(String filePath); | 116 private static native String nativeGetFileURL(String filePath); |
117 private static native String nativeGetSdchURL(); | 117 private static native String nativeGetSdchURL(); |
118 private static native String nativeGetHostPort(); | 118 private static native String nativeGetHostPort(); |
119 private static native boolean nativeIsDataReductionProxySupported(); | 119 private static native boolean nativeIsDataReductionProxySupported(); |
120 } | 120 } |
OLD | NEW |