| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 protected void registerHostResolver(CronetTestFramework framework, boolean i
sLegacyAPI) { | 142 protected void registerHostResolver(CronetTestFramework framework, boolean i
sLegacyAPI) { |
| 143 long urlRequestContextAdapter; | 143 long urlRequestContextAdapter; |
| 144 if (isLegacyAPI) { | 144 if (isLegacyAPI) { |
| 145 urlRequestContextAdapter = ((ChromiumUrlRequestFactory) framework.mR
equestFactory) | 145 urlRequestContextAdapter = ((ChromiumUrlRequestFactory) framework.mR
equestFactory) |
| 146 .getRequestContext() | 146 .getRequestContext() |
| 147 .getUrlRequestContextAdapter(); | 147 .getUrlRequestContextAdapter(); |
| 148 } else { | 148 } else { |
| 149 urlRequestContextAdapter = ((CronetUrlRequestContext) framework.mCro
netEngine) | 149 urlRequestContextAdapter = ((CronetUrlRequestContext) framework.mCro
netEngine) |
| 150 .getUrlRequestContextAdapter(); | 150 .getUrlRequestContextAdapter(); |
| 151 } | 151 } |
| 152 NativeTestServer.registerHostResolverProc(urlRequestContextAdapter, isLe
gacyAPI); | 152 NativeTestServer.registerHostResolverProc( |
| 153 urlRequestContextAdapter, isLegacyAPI, "127.0.0.1"); |
| 153 } | 154 } |
| 154 | 155 |
| 155 @Target(ElementType.METHOD) | 156 @Target(ElementType.METHOD) |
| 156 @Retention(RetentionPolicy.RUNTIME) | 157 @Retention(RetentionPolicy.RUNTIME) |
| 157 public @interface CompareDefaultWithCronet { | 158 public @interface CompareDefaultWithCronet { |
| 158 } | 159 } |
| 159 | 160 |
| 160 @Target(ElementType.METHOD) | 161 @Target(ElementType.METHOD) |
| 161 @Retention(RetentionPolicy.RUNTIME) | 162 @Retention(RetentionPolicy.RUNTIME) |
| 162 public @interface OnlyRunCronetHttpURLConnection { | 163 public @interface OnlyRunCronetHttpURLConnection { |
| 163 } | 164 } |
| 164 | 165 |
| 165 } | 166 } |
| OLD | NEW |