| 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 * useful data as no metrics have yet been collected. | 951 * useful data as no metrics have yet been collected. |
| 952 * | 952 * |
| 953 * @return differences in metrics collected by Cronet, since the last call | 953 * @return differences in metrics collected by Cronet, since the last call |
| 954 * to {@code getGlobalMetricsDeltas()}, serialized as a | 954 * to {@code getGlobalMetricsDeltas()}, serialized as a |
| 955 * <a href=https://developers.google.com/protocol-buffers>protobuf | 955 * <a href=https://developers.google.com/protocol-buffers>protobuf |
| 956 * </a>. | 956 * </a>. |
| 957 */ | 957 */ |
| 958 public abstract byte[] getGlobalMetricsDeltas(); | 958 public abstract byte[] getGlobalMetricsDeltas(); |
| 959 | 959 |
| 960 /** | 960 /** |
| 961 * Returns the effective connection type computed by the network quality |
| 962 * estimator. |
| 963 * @hide as it's a prototype. |
| 964 */ |
| 965 public abstract int getEffectiveConnectionType(); |
| 966 |
| 967 /** |
| 961 * Configures the network quality estimator for testing. This must be called | 968 * Configures the network quality estimator for testing. This must be called |
| 962 * before round trip time and throughput listeners are added, and after the | 969 * before round trip time and throughput listeners are added, and after the |
| 963 * network quality estimator has been enabled. | 970 * network quality estimator has been enabled. |
| 964 * @param useLocalHostRequests include requests to localhost in estimates. | 971 * @param useLocalHostRequests include requests to localhost in estimates. |
| 965 * @param useSmallerResponses include small responses in throughput | 972 * @param useSmallerResponses include small responses in throughput |
| 966 * estimates. | 973 * estimates. |
| 967 * @hide as it's a prototype. | 974 * @hide as it's a prototype. |
| 968 */ | 975 */ |
| 969 public abstract void configureNetworkQualityEstimatorForTesting( | 976 public abstract void configureNetworkQualityEstimatorForTesting( |
| 970 boolean useLocalHostRequests, boolean useSmallerResponses); | 977 boolean useLocalHostRequests, boolean useSmallerResponses); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 | 1120 |
| 1114 /** | 1121 /** |
| 1115 * Removes a finished request listener. | 1122 * Removes a finished request listener. |
| 1116 * | 1123 * |
| 1117 * @param listener the listener to remove. | 1124 * @param listener the listener to remove. |
| 1118 * | 1125 * |
| 1119 * @hide it's a prototype. | 1126 * @hide it's a prototype. |
| 1120 */ | 1127 */ |
| 1121 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste
ner listener); | 1128 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste
ner listener); |
| 1122 } | 1129 } |
| OLD | NEW |