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

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: 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
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 1f93afd75875b297cab9df0606d2041add81f62f..53786a75c591397c9c69b1cb8f661bddca403c63 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
« no previous file with comments | « chrome/browser/chromeos/net/network_change_notifier_chromeos.h ('k') | chrome/browser/chromeos/offline/offline_load_page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698