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

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: Minor browser test fix 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
« no previous file with comments | « content/browser/net_info_browsertest.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a4bf9d18b5b150409218f24cc38a67e8a5cf9a3a..4d18385555d3342d20ac3a88d58262c0c9c33506 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -504,9 +504,10 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.javascript_enabled = true;
}
- prefs.connection_type = net::NetworkChangeNotifier::GetConnectionType();
- prefs.is_online =
- prefs.connection_type != net::NetworkChangeNotifier::CONNECTION_NONE;
+ net::NetworkChangeNotifier::GetMaxBandwidthAndConnectionType(
+ &prefs.net_info_max_bandwidth_mbps, &prefs.net_info_connection_type);
+ prefs.is_online = prefs.net_info_connection_type !=
+ net::NetworkChangeNotifier::CONNECTION_NONE;
prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors();
« no previous file with comments | « content/browser/net_info_browsertest.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698