| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 public static String getNotFoundURL() { | 90 public static String getNotFoundURL() { |
| 91 return nativeGetFileURL("/notfound.html"); | 91 return nativeGetFileURL("/notfound.html"); |
| 92 } | 92 } |
| 93 | 93 |
| 94 public static String getHostPort() { | 94 public static String getHostPort() { |
| 95 return nativeGetHostPort(); | 95 return nativeGetHostPort(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 public static boolean isDataReductionProxySupported() { |
| 99 return nativeIsDataReductionProxySupported(); |
| 100 } |
| 101 |
| 98 @CalledByNative | 102 @CalledByNative |
| 99 private static void onHostResolverProcRegistered() { | 103 private static void onHostResolverProcRegistered() { |
| 100 sHostResolverBlock.open(); | 104 sHostResolverBlock.open(); |
| 101 } | 105 } |
| 102 | 106 |
| 103 private static native boolean nativeStartNativeTestServer(String filePath); | 107 private static native boolean nativeStartNativeTestServer(String filePath); |
| 104 private static native void nativeShutdownNativeTestServer(); | 108 private static native void nativeShutdownNativeTestServer(); |
| 105 private static native void nativeRegisterHostResolverProc( | 109 private static native void nativeRegisterHostResolverProc( |
| 106 long contextAdapter, boolean isLegacyAPI); | 110 long contextAdapter, boolean isLegacyAPI); |
| 107 private static native String nativeGetEchoBodyURL(); | 111 private static native String nativeGetEchoBodyURL(); |
| 108 private static native String nativeGetEchoHeaderURL(String header); | 112 private static native String nativeGetEchoHeaderURL(String header); |
| 109 private static native String nativeGetEchoAllHeadersURL(); | 113 private static native String nativeGetEchoAllHeadersURL(); |
| 110 private static native String nativeGetEchoMethodURL(); | 114 private static native String nativeGetEchoMethodURL(); |
| 111 private static native String nativeGetRedirectToEchoBody(); | 115 private static native String nativeGetRedirectToEchoBody(); |
| 112 private static native String nativeGetFileURL(String filePath); | 116 private static native String nativeGetFileURL(String filePath); |
| 113 private static native String nativeGetSdchURL(); | 117 private static native String nativeGetSdchURL(); |
| 114 private static native String nativeGetHostPort(); | 118 private static native String nativeGetHostPort(); |
| 119 private static native boolean nativeIsDataReductionProxySupported(); |
| 115 } | 120 } |
| OLD | NEW |