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.test.AndroidTestCase; | 7 import android.test.AndroidTestCase; |
8 | 8 |
9 import org.chromium.base.PathUtils; | 9 import org.chromium.base.PathUtils; |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 protected void registerHostResolver(CronetTestFramework framework, boolean i
sLegacyAPI) { | 165 protected void registerHostResolver(CronetTestFramework framework, boolean i
sLegacyAPI) { |
166 long urlRequestContextAdapter; | 166 long urlRequestContextAdapter; |
167 if (isLegacyAPI) { | 167 if (isLegacyAPI) { |
168 urlRequestContextAdapter = ((ChromiumUrlRequestFactory) framework.mR
equestFactory) | 168 urlRequestContextAdapter = ((ChromiumUrlRequestFactory) framework.mR
equestFactory) |
169 .getRequestContext() | 169 .getRequestContext() |
170 .getUrlRequestContextAdapter(); | 170 .getUrlRequestContextAdapter(); |
171 } else { | 171 } else { |
172 urlRequestContextAdapter = ((CronetUrlRequestContext) framework.mCro
netEngine) | 172 urlRequestContextAdapter = ((CronetUrlRequestContext) framework.mCro
netEngine) |
173 .getUrlRequestContextAdapter(); | 173 .getUrlRequestContextAdapter(); |
174 } | 174 } |
175 NativeTestServer.registerHostResolverProc(urlRequestContextAdapter, isLe
gacyAPI); | 175 CronetTestUtil.registerHostResolverProc(urlRequestContextAdapter, isLega
cyAPI, "127.0.0.1"); |
176 } | 176 } |
177 | 177 |
178 @Target(ElementType.METHOD) | 178 @Target(ElementType.METHOD) |
179 @Retention(RetentionPolicy.RUNTIME) | 179 @Retention(RetentionPolicy.RUNTIME) |
180 public @interface CompareDefaultWithCronet { | 180 public @interface CompareDefaultWithCronet { |
181 } | 181 } |
182 | 182 |
183 @Target(ElementType.METHOD) | 183 @Target(ElementType.METHOD) |
184 @Retention(RetentionPolicy.RUNTIME) | 184 @Retention(RetentionPolicy.RUNTIME) |
185 public @interface OnlyRunCronetHttpURLConnection { | 185 public @interface OnlyRunCronetHttpURLConnection { |
186 } | 186 } |
187 | 187 |
188 @Target(ElementType.METHOD) | 188 @Target(ElementType.METHOD) |
189 @Retention(RetentionPolicy.RUNTIME) | 189 @Retention(RetentionPolicy.RUNTIME) |
190 public @interface OnlyRunNativeCronet {} | 190 public @interface OnlyRunNativeCronet {} |
191 } | 191 } |
OLD | NEW |