| 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; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.net.http.HttpResponseCache; | 9 import android.net.http.HttpResponseCache; |
| 10 import android.support.annotation.IntDef; | 10 import android.support.annotation.IntDef; |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 * useful data as no metrics have yet been collected. | 952 * useful data as no metrics have yet been collected. |
| 953 * | 953 * |
| 954 * @return differences in metrics collected by Cronet, since the last call | 954 * @return differences in metrics collected by Cronet, since the last call |
| 955 * to {@code getGlobalMetricsDeltas()}, serialized as a | 955 * to {@code getGlobalMetricsDeltas()}, serialized as a |
| 956 * <a href=https://developers.google.com/protocol-buffers>protobuf | 956 * <a href=https://developers.google.com/protocol-buffers>protobuf |
| 957 * </a>. | 957 * </a>. |
| 958 */ | 958 */ |
| 959 public abstract byte[] getGlobalMetricsDeltas(); | 959 public abstract byte[] getGlobalMetricsDeltas(); |
| 960 | 960 |
| 961 /** | 961 /** |
| 962 * Returns the effective connection type computed by the network quality |
| 963 * estimator. |
| 964 * @hide as it's a prototype. |
| 965 */ |
| 966 public abstract EffectiveConnectionType getEffectiveConnectionType(); |
| 967 |
| 968 /** |
| 962 * Configures the network quality estimator for testing. This must be called | 969 * Configures the network quality estimator for testing. This must be called |
| 963 * before round trip time and throughput listeners are added, and after the | 970 * before round trip time and throughput listeners are added, and after the |
| 964 * network quality estimator has been enabled. | 971 * network quality estimator has been enabled. |
| 965 * @param useLocalHostRequests include requests to localhost in estimates. | 972 * @param useLocalHostRequests include requests to localhost in estimates. |
| 966 * @param useSmallerResponses include small responses in throughput | 973 * @param useSmallerResponses include small responses in throughput |
| 967 * estimates. | 974 * estimates. |
| 968 * @hide as it's a prototype. | 975 * @hide as it's a prototype. |
| 969 */ | 976 */ |
| 970 public abstract void configureNetworkQualityEstimatorForTesting( | 977 public abstract void configureNetworkQualityEstimatorForTesting( |
| 971 boolean useLocalHostRequests, boolean useSmallerResponses); | 978 boolean useLocalHostRequests, boolean useSmallerResponses); |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1237 |
| 1231 /** | 1238 /** |
| 1232 * Returns total bytes received over the network transport layer, or nul
l if not collected. | 1239 * Returns total bytes received over the network transport layer, or nul
l if not collected. |
| 1233 */ | 1240 */ |
| 1234 @Nullable | 1241 @Nullable |
| 1235 public Long getReceivedBytesCount() { | 1242 public Long getReceivedBytesCount() { |
| 1236 return mReceivedBytesCount; | 1243 return mReceivedBytesCount; |
| 1237 } | 1244 } |
| 1238 } | 1245 } |
| 1239 } | 1246 } |
| OLD | NEW |