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..a0725c32d7148759150649af0003595b54635721 |
--- /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); |
+} |