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

Unified Diff: components/cronet/android/java/src/org/chromium/net/NetworkQualityThroughputObserver.java

Issue 1273173002: Added Network Quality Estimator Real-time interface to Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed remaining comments Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/cronet/android/java/src/org/chromium/net/NetworkQualityThroughputObserver.java
diff --git a/components/cronet/android/java/src/org/chromium/net/NetworkQualityThroughputObserver.java b/components/cronet/android/java/src/org/chromium/net/NetworkQualityThroughputObserver.java
new file mode 100644
index 0000000000000000000000000000000000000000..46706c8667eb377937b7b29648e28cd788caaaf5
--- /dev/null
+++ b/components/cronet/android/java/src/org/chromium/net/NetworkQualityThroughputObserver.java
@@ -0,0 +1,19 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.net;
+
+/**
+ * Interface to watch for observations of throughput.
+ */
+public interface NetworkQualityThroughputObserver {
+ /**
+ * Reports a new throughput observation. This is called on the network thread, so the
+ * observer should exit quickly.
+ * @param throughputKbps The downstream throughput in kilobits per second.
+ * @param whenMs The time since the epoch in milliseconds.
+ * @param source The observation source from {@link NetworkQualityObservationSource}.
+ */
+ public void onThroughputObservation(int throughputKbps, long whenMs, int source);
+}

Powered by Google App Engine
This is Rietveld 408576698