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

Unified Diff: remoting/host/signaling_connector.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 | « remoting/host/signaling_connector.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/signaling_connector.cc
diff --git a/remoting/host/signaling_connector.cc b/remoting/host/signaling_connector.cc
index a9bef150ee9045ca701e599b09c652bef9c7279b..e93c398c6ead97ef625c11c4ea3bd52d4ba64b53 100644
--- a/remoting/host/signaling_connector.cc
+++ b/remoting/host/signaling_connector.cc
@@ -39,7 +39,7 @@ SignalingConnector::SignalingConnector(
reconnect_attempts_(0),
refreshing_oauth_token_(false) {
DCHECK(!auth_failed_callback_.is_null());
- net::NetworkChangeNotifier::AddOnlineStateObserver(this);
+ net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
net::NetworkChangeNotifier::AddIPAddressObserver(this);
signal_strategy_->AddListener(this);
ScheduleTryReconnect();
@@ -47,7 +47,7 @@ SignalingConnector::SignalingConnector(
SignalingConnector::~SignalingConnector() {
signal_strategy_->RemoveListener(this);
- net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
}
@@ -86,9 +86,10 @@ void SignalingConnector::OnIPAddressChanged() {
ResetAndTryReconnect();
}
-void SignalingConnector::OnOnlineStateChanged(bool online) {
+void SignalingConnector::OnConnectionTypeChanged(
+ net::NetworkChangeNotifier::ConnectionType type) {
DCHECK(CalledOnValidThread());
- if (online) {
+ if (type != net::NetworkChangeNotifier::CONNECTION_NONE) {
LOG(INFO) << "Network state changed to online.";
ResetAndTryReconnect();
}
« no previous file with comments | « remoting/host/signaling_connector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698