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

Unified Diff: chrome/browser/chromeos/net/network_change_notifier_chromeos.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: Review comments 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
Index: chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
diff --git a/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc b/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
index dd9b2c86f5b9361110d60416042979f9fd0fe78f..5ae6d60ad16583256f538482d4441ca337912964 100644
--- a/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
+++ b/chrome/browser/chromeos/net/network_change_notifier_chromeos.cc
@@ -83,8 +83,12 @@ void NetworkChangeNotifierChromeos::OnNetworkManagerChanged(
UpdateNetworkState(cros);
}
-bool NetworkChangeNotifierChromeos::IsCurrentlyOffline() const {
- return !IsOnline(connection_state_);
+net::NetworkChangeNotifier::ConnectionType
+NetworkChangeNotifierChromeos::GetCurrentConnectionType() const {
+ // TODO(droger): Return something more detailed than CONNECTION_UNKNOWN.
+ return IsOnline(connection_state_) ?
+ net::NetworkChangeNotifier::CONNECTION_UNKNOWN :
+ net::NetworkChangeNotifier::CONNECTION_NONE;
}
void NetworkChangeNotifierChromeos::OnNetworkChanged(
@@ -205,7 +209,8 @@ void NetworkChangeNotifierChromeos::ReportOnlineStateChangeOnUIThread() {
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(
- &NetworkChangeNotifierChromeos::NotifyObserversOfOnlineStateChange));
+ &NetworkChangeNotifierChromeos::
+ NotifyObserversOfConnectionTypeChange));
}
// static

Powered by Google App Engine
This is Rietveld 408576698