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

Unified Diff: remoting/host/signaling_connector.cc

Issue 11620007: Switch from OnIPAddressChanged and OnConnectionTypeChange to OnNetworkChanged Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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: remoting/host/signaling_connector.cc
diff --git a/remoting/host/signaling_connector.cc b/remoting/host/signaling_connector.cc
index 97d0eb13d6b9cd6d9c4fc0e1224706d6e68b2e68..b5e9044413515b0f36261948e2d68dfaf452bc79 100644
--- a/remoting/host/signaling_connector.cc
+++ b/remoting/host/signaling_connector.cc
@@ -44,16 +44,14 @@ SignalingConnector::SignalingConnector(
refreshing_oauth_token_(false) {
DCHECK(!auth_failed_callback_.is_null());
DCHECK(dns_blackhole_checker_.get());
- net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
- net::NetworkChangeNotifier::AddIPAddressObserver(this);
+ net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
signal_strategy_->AddListener(this);
ScheduleTryReconnect();
}
SignalingConnector::~SignalingConnector() {
signal_strategy_->RemoveListener(this);
- net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
- net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
+ net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
}
void SignalingConnector::EnableOAuth(
@@ -89,7 +87,7 @@ bool SignalingConnector::OnSignalStrategyIncomingStanza(
return false;
}
-void SignalingConnector::OnConnectionTypeChanged(
+void SignalingConnector::OnNetworkChanged(
net::NetworkChangeNotifier::ConnectionType type) {
DCHECK(CalledOnValidThread());
if (type != net::NetworkChangeNotifier::CONNECTION_NONE) {
@@ -98,12 +96,6 @@ void SignalingConnector::OnConnectionTypeChanged(
}
}
-void SignalingConnector::OnIPAddressChanged() {
- DCHECK(CalledOnValidThread());
- LOG(INFO) << "IP address has changed.";
- ResetAndTryReconnect();
-}
-
void SignalingConnector::OnGetTokensResponse(const std::string& user_email,
const std::string& access_token,
int expires_seconds) {

Powered by Google App Engine
This is Rietveld 408576698