| Index: jingle/notifier/communicator/login.cc
|
| diff --git a/jingle/notifier/communicator/login.cc b/jingle/notifier/communicator/login.cc
|
| index 8350d2fc03616d91ec279f4df9c4d9cfa3d2dcc2..d233c7048d64b28311b5419df4bffc96efe39bf6 100644
|
| --- a/jingle/notifier/communicator/login.cc
|
| +++ b/jingle/notifier/communicator/login.cc
|
| @@ -42,15 +42,13 @@ Login::Login(Delegate* delegate,
|
| servers,
|
| try_ssltcp_first,
|
| auth_mechanism) {
|
| - net::NetworkChangeNotifier::AddIPAddressObserver(this);
|
| - net::NetworkChangeNotifier::AddConnectionTypeObserver(this);
|
| + net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
|
| // TODO(akalin): Add as DNSObserver once bug 130610 is fixed.
|
| ResetReconnectState();
|
| }
|
|
|
| Login::~Login() {
|
| - net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this);
|
| - net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
|
| + net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
|
| }
|
|
|
| void Login::StartConnection() {
|
| @@ -94,15 +92,12 @@ void Login::OnSettingsExhausted() {
|
| delegate_->OnTransientDisconnection();
|
| }
|
|
|
| -void Login::OnIPAddressChanged() {
|
| - DVLOG(1) << "IP address changed";
|
| - OnNetworkEvent();
|
| -}
|
| -
|
| -void Login::OnConnectionTypeChanged(
|
| +void Login::OnNetworkChanged(
|
| net::NetworkChangeNotifier::ConnectionType type) {
|
| - DVLOG(1) << "Connection type changed";
|
| - OnNetworkEvent();
|
| + if (type != net::NetworkChangeNotifier::CONNECTION_NONE) {
|
| + DVLOG(1) << "Network changed";
|
| + OnNetworkEvent();
|
| + }
|
| }
|
|
|
| void Login::OnDNSChanged() {
|
|
|