Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2131 double max_bandwidth_mbps) { | 2131 double max_bandwidth_mbps) { |
| 2132 bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; | 2132 bool online = type != net::NetworkChangeNotifier::CONNECTION_NONE; |
| 2133 WebNetworkStateNotifier::SetOnLine(online); | 2133 WebNetworkStateNotifier::SetOnLine(online); |
| 2134 for (auto& observer : observers_) | 2134 for (auto& observer : observers_) |
| 2135 observer.NetworkStateChanged(online); | 2135 observer.NetworkStateChanged(online); |
| 2136 WebNetworkStateNotifier::SetWebConnection( | 2136 WebNetworkStateNotifier::SetWebConnection( |
| 2137 NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps); | 2137 NetConnectionTypeToWebConnectionType(type), max_bandwidth_mbps); |
| 2138 } | 2138 } |
| 2139 | 2139 |
| 2140 void RenderThreadImpl::OnNetworkQualityChanged( | 2140 void RenderThreadImpl::OnNetworkQualityChanged( |
| 2141 net::EffectiveConnectionType type, | |
|
nasko
2017/05/23 04:54:37
This doesn't seem to be used at all.
tbansal1
2017/05/23 18:35:28
I have added the plumbing to Blink.
| |
| 2141 base::TimeDelta http_rtt, | 2142 base::TimeDelta http_rtt, |
| 2142 base::TimeDelta transport_rtt, | 2143 base::TimeDelta transport_rtt, |
| 2143 double downlink_throughput_kbps) { | 2144 double downlink_throughput_kbps) { |
| 2144 UMA_HISTOGRAM_BOOLEAN("NQE.RenderThreadNotified", true); | 2145 UMA_HISTOGRAM_BOOLEAN("NQE.RenderThreadNotified", true); |
| 2145 WebNetworkStateNotifier::SetNetworkQuality(http_rtt, transport_rtt, | 2146 WebNetworkStateNotifier::SetNetworkQuality(http_rtt, transport_rtt, |
| 2146 downlink_throughput_kbps); | 2147 downlink_throughput_kbps); |
| 2147 } | 2148 } |
| 2148 | 2149 |
| 2149 void RenderThreadImpl::SetWebKitSharedTimersSuspended(bool suspend) { | 2150 void RenderThreadImpl::SetWebKitSharedTimersSuspended(bool suspend) { |
| 2150 #if defined(OS_ANDROID) | 2151 #if defined(OS_ANDROID) |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2458 } | 2459 } |
| 2459 } | 2460 } |
| 2460 | 2461 |
| 2461 void RenderThreadImpl::OnRendererInterfaceRequest( | 2462 void RenderThreadImpl::OnRendererInterfaceRequest( |
| 2462 mojom::RendererAssociatedRequest request) { | 2463 mojom::RendererAssociatedRequest request) { |
| 2463 DCHECK(!renderer_binding_.is_bound()); | 2464 DCHECK(!renderer_binding_.is_bound()); |
| 2464 renderer_binding_.Bind(std::move(request)); | 2465 renderer_binding_.Bind(std::move(request)); |
| 2465 } | 2466 } |
| 2466 | 2467 |
| 2467 } // namespace content | 2468 } // namespace content |
| OLD | NEW |