Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Side by Side Diff: components/cronet/android/api/src/org/chromium/net/CronetEngine.java

Issue 2223773003: Expose effective connection type to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased, addressed comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 * useful data as no metrics have yet been collected. 956 * useful data as no metrics have yet been collected.
957 * 957 *
958 * @return differences in metrics collected by Cronet, since the last call 958 * @return differences in metrics collected by Cronet, since the last call
959 * to {@code getGlobalMetricsDeltas()}, serialized as a 959 * to {@code getGlobalMetricsDeltas()}, serialized as a
960 * <a href=https://developers.google.com/protocol-buffers>protobuf 960 * <a href=https://developers.google.com/protocol-buffers>protobuf
961 * </a>. 961 * </a>.
962 */ 962 */
963 public abstract byte[] getGlobalMetricsDeltas(); 963 public abstract byte[] getGlobalMetricsDeltas();
964 964
965 /** 965 /**
966 * Returns the effective connection type computed by the network quality
967 * estimator.
968 * @hide as it's a prototype.
969 */
970 public abstract int getEffectiveConnectionType();
971
972 /**
966 * Configures the network quality estimator for testing. This must be called 973 * Configures the network quality estimator for testing. This must be called
967 * before round trip time and throughput listeners are added, and after the 974 * before round trip time and throughput listeners are added, and after the
968 * network quality estimator has been enabled. 975 * network quality estimator has been enabled.
969 * @param useLocalHostRequests include requests to localhost in estimates. 976 * @param useLocalHostRequests include requests to localhost in estimates.
970 * @param useSmallerResponses include small responses in throughput 977 * @param useSmallerResponses include small responses in throughput
971 * estimates. 978 * estimates.
972 * @hide as it's a prototype. 979 * @hide as it's a prototype.
973 */ 980 */
974 public abstract void configureNetworkQualityEstimatorForTesting( 981 public abstract void configureNetworkQualityEstimatorForTesting(
975 boolean useLocalHostRequests, boolean useSmallerResponses); 982 boolean useLocalHostRequests, boolean useSmallerResponses);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1125
1119 /** 1126 /**
1120 * Removes a finished request listener. 1127 * Removes a finished request listener.
1121 * 1128 *
1122 * @param listener the listener to remove. 1129 * @param listener the listener to remove.
1123 * 1130 *
1124 * @hide it's a prototype. 1131 * @hide it's a prototype.
1125 */ 1132 */
1126 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste ner listener); 1133 public abstract void removeRequestFinishedListener(RequestFinishedInfo.Liste ner listener);
1127 } 1134 }
OLDNEW
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/android/api/src/org/chromium/net/JavaCronetEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698