Chromium Code Reviews| 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; |
| 12 import org.chromium.net.ExperimentalCronetEngine; | |
|
pauljensen
2016/11/09 19:55:16
can we remove this and instead just import static
kapishnikov
2016/11/09 20:17:19
Removed
| |
| 13 import org.chromium.net.NetworkQualityRttListener; | 13 import org.chromium.net.NetworkQualityRttListener; |
| 14 import org.chromium.net.NetworkQualityThroughputListener; | 14 import org.chromium.net.NetworkQualityThroughputListener; |
| 15 import org.chromium.net.RequestFinishedInfo; | 15 import org.chromium.net.RequestFinishedInfo; |
| 16 import org.chromium.net.RttThroughputValues; | |
| 17 import org.chromium.net.UrlRequest; | 16 import org.chromium.net.UrlRequest; |
| 18 | 17 |
| 19 import java.io.IOException; | 18 import java.io.IOException; |
| 20 import java.net.Proxy; | 19 import java.net.Proxy; |
| 21 import java.net.URL; | 20 import java.net.URL; |
| 22 import java.net.URLConnection; | 21 import java.net.URLConnection; |
| 23 import java.net.URLStreamHandler; | 22 import java.net.URLStreamHandler; |
| 24 import java.net.URLStreamHandlerFactory; | 23 import java.net.URLStreamHandlerFactory; |
| 25 import java.util.Collection; | 24 import java.util.Collection; |
| 26 import java.util.List; | 25 import java.util.List; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 return ""; | 112 return ""; |
| 114 } | 113 } |
| 115 | 114 |
| 116 @Override | 115 @Override |
| 117 public byte[] getGlobalMetricsDeltas() { | 116 public byte[] getGlobalMetricsDeltas() { |
| 118 return new byte[0]; | 117 return new byte[0]; |
| 119 } | 118 } |
| 120 | 119 |
| 121 @Override | 120 @Override |
| 122 public int getEffectiveConnectionType() { | 121 public int getEffectiveConnectionType() { |
| 123 return EffectiveConnectionType.TYPE_UNKNOWN; | 122 return EFFECTIVE_CONNECTION_TYPE_UNKNOWN; |
|
pauljensen
2016/11/09 19:55:16
wait, how can it find this member? it's not impor
kapishnikov
2016/11/09 20:17:19
It can find it because it is declared in the super
| |
| 124 } | 123 } |
| 125 | 124 |
| 126 @Override | 125 @Override |
| 127 public int getHttpRttMs() { | 126 public int getHttpRttMs() { |
| 128 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 127 return ExperimentalCronetEngine.CONNECTION_METRIC_UNKNOWN; |
| 129 } | 128 } |
| 130 | 129 |
| 131 @Override | 130 @Override |
| 132 public int getTransportRttMs() { | 131 public int getTransportRttMs() { |
| 133 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 132 return ExperimentalCronetEngine.CONNECTION_METRIC_UNKNOWN; |
| 134 } | 133 } |
| 135 | 134 |
| 136 @Override | 135 @Override |
| 137 public int getDownstreamThroughputKbps() { | 136 public int getDownstreamThroughputKbps() { |
| 138 return RttThroughputValues.INVALID_RTT_THROUGHPUT; | 137 return ExperimentalCronetEngine.CONNECTION_METRIC_UNKNOWN; |
| 139 } | 138 } |
| 140 | 139 |
| 141 @Override | 140 @Override |
| 142 public void configureNetworkQualityEstimatorForTesting( | 141 public void configureNetworkQualityEstimatorForTesting( |
| 143 boolean useLocalHostRequests, boolean useSmallerResponses) {} | 142 boolean useLocalHostRequests, boolean useSmallerResponses) {} |
| 144 | 143 |
| 145 @Override | 144 @Override |
| 146 public void addRttListener(NetworkQualityRttListener listener) {} | 145 public void addRttListener(NetworkQualityRttListener listener) {} |
| 147 | 146 |
| 148 @Override | 147 @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 | 174 // Returning null causes this factory to pass though, which ends up usin g the platform's |
| 176 // implementation. | 175 // implementation. |
| 177 return new URLStreamHandlerFactory() { | 176 return new URLStreamHandlerFactory() { |
| 178 @Override | 177 @Override |
| 179 public URLStreamHandler createURLStreamHandler(String protocol) { | 178 public URLStreamHandler createURLStreamHandler(String protocol) { |
| 180 return null; | 179 return null; |
| 181 } | 180 } |
| 182 }; | 181 }; |
| 183 } | 182 } |
| 184 } | 183 } |
| OLD | NEW |