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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1306423004: [NetInfo] Browser changes to support connection.downlinkMax (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up 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: 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();

Powered by Google App Engine
This is Rietveld 408576698