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

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

Issue 2146563002: Expose effective connection type to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated comments Created 4 years, 5 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 * that do not provide an executor. 892 * that do not provide an executor.
893 * TODO(tbansal): http://crbug.com/618034 Remove this API. In short term, 893 * TODO(tbansal): http://crbug.com/618034 Remove this API. In short term,
894 * once all Cronet embedders supply a valid executor with 894 * once all Cronet embedders supply a valid executor with
895 * NetworkQualityRTTListener, update the above comment to reflect that 895 * NetworkQualityRTTListener, update the above comment to reflect that
896 * {@link executor} is only used to notify RequestFinishedListeners. 896 * {@link executor} is only used to notify RequestFinishedListeners.
897 * @hide as it's a prototype. 897 * @hide as it's a prototype.
898 */ 898 */
899 public abstract void setRequestFinishedListenerExecutor(Executor executor); 899 public abstract void setRequestFinishedListenerExecutor(Executor executor);
900 900
901 /** 901 /**
902 * Returns the effective connection type computed by network quality
903 * estimator. The return value is an enum specified in
904 * NetworkQualityEstimator::EffectiveConnectionType in
905 * //net/nqe/network_quality_estimator.h.
pauljensen 2016/07/18 13:42:17 I think there are a few issues here: 1. It's not c
tbansal1 2016/08/01 20:58:09 Done.
906 */
907 public abstract int getEffectiveConnectionType();
908
909 /**
902 * Enables the network quality estimator, which collects and reports 910 * Enables the network quality estimator, which collects and reports
903 * measurements of round trip time (RTT) and downstream throughput at 911 * measurements of round trip time (RTT) and downstream throughput at
904 * various layers of the network stack. After enabling the estimator, 912 * various layers of the network stack. After enabling the estimator,
905 * listeners of RTT and throughput can be added with 913 * listeners of RTT and throughput can be added with
906 * {@link #addRttListener} and {@link #addThroughputListener} and 914 * {@link #addRttListener} and {@link #addThroughputListener} and
907 * removed with {@link #removeRttListener} and 915 * removed with {@link #removeRttListener} and
908 * {@link #removeThroughputListener}. The estimator uses memory and CPU 916 * {@link #removeThroughputListener}. The estimator uses memory and CPU
909 * only when enabled. 917 * only when enabled.
910 * @param executor an executor that will be used to notified all 918 * @param executor an executor that will be used to notified all
911 * added RTT and throughput listeners. 919 * added RTT and throughput listeners.
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 * @hide as it's a prototype. 1209 * @hide as it's a prototype.
1202 */ 1210 */
1203 public interface RequestFinishedListener { 1211 public interface RequestFinishedListener {
1204 /** 1212 /**
1205 * Invoked with request info. 1213 * Invoked with request info.
1206 * @param requestInfo {@link UrlRequestInfo} for finished request. 1214 * @param requestInfo {@link UrlRequestInfo} for finished request.
1207 */ 1215 */
1208 void onRequestFinished(UrlRequestInfo requestInfo); 1216 void onRequestFinished(UrlRequestInfo requestInfo);
1209 } 1217 }
1210 } 1218 }
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