Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
| index 19033a8ecdfa24d7156bc34187e4d0aa82ada488..3e2f64e3b8f886b223c357e1a203656d308e8c47 100644 |
| --- a/content/browser/renderer_host/render_view_host_impl.cc |
| +++ b/content/browser/renderer_host/render_view_host_impl.cc |
| @@ -494,9 +494,12 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() { |
| prefs.javascript_enabled = true; |
| } |
| - prefs.connection_type = net::NetworkChangeNotifier::GetConnectionType(); |
| - prefs.is_online = |
| - prefs.connection_type != net::NetworkChangeNotifier::CONNECTION_NONE; |
| + prefs.net_info_connection_type = |
| + net::NetworkChangeNotifier::GetConnectionType(); |
| + prefs.net_info_max_bandwidth_mbps = |
| + net::NetworkChangeNotifier::GetMaxBandwidth(); |
|
pauljensen
2015/09/11 14:25:37
This looks racy. Connection type could have chang
jkarlin
2015/09/11 20:15:21
Ugh, I forgot NCN was thread safe. Okay, changed G
|
| + prefs.is_online = prefs.net_info_connection_type != |
| + net::NetworkChangeNotifier::CONNECTION_NONE; |
| prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |