| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.impl; | 5 package org.chromium.net.impl; |
| 6 | 6 |
| 7 import static android.os.Process.THREAD_PRIORITY_BACKGROUND; | 7 import static android.os.Process.THREAD_PRIORITY_BACKGROUND; |
| 8 import static android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE; | 8 import static android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE; |
| 9 | 9 |
| 10 import org.chromium.net.BidirectionalStream; | 10 import org.chromium.net.BidirectionalStream; |
| 11 import org.chromium.net.EffectiveConnectionType; | |
| 12 import org.chromium.net.ExperimentalBidirectionalStream; | 11 import org.chromium.net.ExperimentalBidirectionalStream; |
| 13 import org.chromium.net.NetworkQualityRttListener; | 12 import org.chromium.net.NetworkQualityRttListener; |
| 14 import org.chromium.net.NetworkQualityThroughputListener; | 13 import org.chromium.net.NetworkQualityThroughputListener; |
| 15 import org.chromium.net.RequestFinishedInfo; | 14 import org.chromium.net.RequestFinishedInfo; |
| 16 import org.chromium.net.RttThroughputValues; | |
| 17 import org.chromium.net.UrlRequest; | 15 import org.chromium.net.UrlRequest; |
| 18 | 16 |
| 19 import java.io.IOException; | 17 import java.io.IOException; |
| 20 import java.net.Proxy; | 18 import java.net.Proxy; |
| 21 import java.net.URL; | 19 import java.net.URL; |
| 22 import java.net.URLConnection; | 20 import java.net.URLConnection; |
| 23 import java.net.URLStreamHandler; | 21 import java.net.URLStreamHandler; |
| 24 import java.net.URLStreamHandlerFactory; | 22 import java.net.URLStreamHandlerFactory; |
| 25 import java.util.Collection; | 23 import java.util.Collection; |
| 26 import java.util.List; | 24 import java.util.List; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return ""; | 111 return ""; |
| 114 } | 112 } |
| 115 | 113 |
| 116 @Override | 114 @Override |
| 117 public byte[] getGlobalMetricsDeltas() { | 115 public byte[] getGlobalMetricsDeltas() { |
| 118 return new byte[0]; | 116 return new byte[0]; |
| 119 } | 117 } |
| 120 | 118 |
| 121 @Override | 119 @Override |
| 122 public int getEffectiveConnectionType() { | 120 public int getEffectiveConnectionType() { |
| 123 return EffectiveConnectionType.TYPE_UNKNOWN; | 121 return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; |
| 124 } | 122 } |
| 125 | 123 |
| 126 @Override | 124 @Override |
| 127 public int getHttpRttMs() { | 125 public int getHttpRttMs() { |
| 128 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 126 return CONNECTION_METRIC_UNKNOWN; |
| 129 } | 127 } |
| 130 | 128 |
| 131 @Override | 129 @Override |
| 132 public int getTransportRttMs() { | 130 public int getTransportRttMs() { |
| 133 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 131 return CONNECTION_METRIC_UNKNOWN; |
| 134 } | 132 } |
| 135 | 133 |
| 136 @Override | 134 @Override |
| 137 public int getDownstreamThroughputKbps() { | 135 public int getDownstreamThroughputKbps() { |
| 138 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 136 return CONNECTION_METRIC_UNKNOWN; |
| 139 } | 137 } |
| 140 | 138 |
| 141 @Override | 139 @Override |
| 142 public void configureNetworkQualityEstimatorForTesting( | 140 public void configureNetworkQualityEstimatorForTesting( |
| 143 boolean useLocalHostRequests, boolean useSmallerResponses) {} | 141 boolean useLocalHostRequests, boolean useSmallerResponses) {} |
| 144 | 142 |
| 145 @Override | 143 @Override |
| 146 public void addRttListener(NetworkQualityRttListener listener) {} | 144 public void addRttListener(NetworkQualityRttListener listener) {} |
| 147 | 145 |
| 148 @Override | 146 @Override |
| (...skipping 26 matching lines...) Expand all Loading... |
| 175 // Returning null causes this factory to pass though, which ends up usin
g the platform's | 173 // Returning null causes this factory to pass though, which ends up usin
g the platform's |
| 176 // implementation. | 174 // implementation. |
| 177 return new URLStreamHandlerFactory() { | 175 return new URLStreamHandlerFactory() { |
| 178 @Override | 176 @Override |
| 179 public URLStreamHandler createURLStreamHandler(String protocol) { | 177 public URLStreamHandler createURLStreamHandler(String protocol) { |
| 180 return null; | 178 return null; |
| 181 } | 179 } |
| 182 }; | 180 }; |
| 183 } | 181 } |
| 184 } | 182 } |
| OLD | NEW |