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

Unified Diff: content/browser/net/browser_online_state_observer.cc

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed a typo Created 8 years, 7 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/ppapi_plugin_process_host.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 57f3d151714cf9d1f66b284c503652f932c6ccb5..6e774576de2a3b48f5eb9ba5191b9931f147d399 100644
--- a/content/browser/net/browser_online_state_observer.cc
+++ b/content/browser/net/browser_online_state_observer.cc
@@ -8,17 +8,19 @@
#include "content/browser/renderer_host/render_process_host_impl.h"
BrowserOnlineStateObserver::BrowserOnlineStateObserver() {
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
+ net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
}
BrowserOnlineStateObserver::~BrowserOnlineStateObserver() {
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
}
-void BrowserOnlineStateObserver::OnOnlineStateChanged(bool online) {
+void BrowserOnlineStateObserver::OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
for (content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- it.GetCurrentValue()->Send(new ViewMsg_NetworkStateChanged(online));
+ it.GetCurrentValue()->Send(new ViewMsg_NetworkStateChanged(
+ type != net::NetworkChangeNotifier::CONNECTION_NONE));
}
}
« no previous file with comments | « content/browser/net/browser_online_state_observer.h ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698