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

Unified Diff: content/browser/net/browser_online_state_observer.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/browser_online_state_observer.h ('k') | content/browser/net_info_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/net/browser_online_state_observer.cc
diff --git a/content/browser/net/browser_online_state_observer.cc b/content/browser/net/browser_online_state_observer.cc
index 76f2bb350c8bd062d7acc56b0e1060c308dd2e4d..23071d6816149f4c42e0ec5608fb0a4ff31dd7d7 100644
--- a/content/browser/net/browser_online_state_observer.cc
+++ b/content/browser/net/browser_online_state_observer.cc
@@ -10,18 +10,20 @@
namespace content {
BrowserOnlineStateObserver::BrowserOnlineStateObserver() {
- net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
+ net::NetworkChangeNotifier::AddMaxBandwidthObserver(this);
}
BrowserOnlineStateObserver::~BrowserOnlineStateObserver() {
- net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
+ net::NetworkChangeNotifier::RemoveMaxBandwidthObserver(this);
}
-void BrowserOnlineStateObserver::OnConnectionTypeChanged(
+void BrowserOnlineStateObserver::OnMaxBandwidthChanged(
+ double max_bandwidth_mbps,
net::NetworkChangeNotifier::ConnectionType type) {
for (RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- it.GetCurrentValue()->Send(new ViewMsg_NetworkTypeChanged(type));
+ it.GetCurrentValue()->Send(
+ new ViewMsg_NetworkConnectionChanged(type, max_bandwidth_mbps));
}
}
« no previous file with comments | « content/browser/net/browser_online_state_observer.h ('k') | content/browser/net_info_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698