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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2857093002: Expose changes in the network quality to the renderers (Closed)
Patch Set: nasko comments Created 3 years, 7 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: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 9dad0206afcd8f05445f0486fe1a066391a0249b..4257028ba1206bc8f08dc7287126dcc7d489db04 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -2129,6 +2129,15 @@ void RenderThreadImpl::OnNetworkConnectionChanged(
NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps);
}
+void RenderThreadImpl::OnNetworkQualityChanged(
+ double http_rtt_msec,
+ double transport_rtt_msec,
+ double downlink_throughput_kbps) {
+ UMA_HISTOGRAM_EXACT_LINEAR("NQE.RenderThreadNotified", 1, 2);
Ilya Sherman 2017/05/09 21:51:25 nit: UMA_HISTOGRAM_BOOLEAN("NQE.RenderThreadNotifi
tbansal1 2017/05/09 23:49:30 Done. Can you comment a bit on why EXACT_LINEAR is
Ilya Sherman 2017/05/09 23:55:52 EXACT_LINEAR would be fine as well, I think -- tho
tbansal1 2017/05/10 16:46:42 Acknowledged.
+ // TODO(tbansal): https://crbug.com/719108. Notify WebNetworkStateNotifier of
+ // the change in the network quality.
+}
+
void RenderThreadImpl::SetWebKitSharedTimersSuspended(bool suspend) {
#if defined(OS_ANDROID)
if (suspend) {

Powered by Google App Engine
This is Rietveld 408576698