Chromium Code Reviews| Index: chrome/browser/chromeos/web_socket_proxy_controller.cc |
| diff --git a/chrome/browser/chromeos/web_socket_proxy_controller.cc b/chrome/browser/chromeos/web_socket_proxy_controller.cc |
| index 3e673367ad8b076f5c05b00ce4d41217e250eb8c..864ab8a7f3ff878aa6278d1d59b2e2057d4b2f9a 100644 |
| --- a/chrome/browser/chromeos/web_socket_proxy_controller.cc |
| +++ b/chrome/browser/chromeos/web_socket_proxy_controller.cc |
| @@ -33,7 +33,7 @@ |
| namespace { |
| class ProxyLifetime |
| - : public net::NetworkChangeNotifier::ConnectionTypeObserver, |
| + : public net::NetworkChangeNotifier::NetworkChangeObserver, |
| public content::NotificationObserver { |
| public: |
| ProxyLifetime() |
| @@ -47,14 +47,14 @@ class ProxyLifetime |
| web_socket_proxy_thread_.message_loop()->PostTask( |
| FROM_HERE, |
| base::Bind(&ProxyLifetime::ProxyCallback, base::Unretained(this))); |
| - net::NetworkChangeNotifier::AddConnectionTypeObserver(this); |
| + net::NetworkChangeNotifier::AddNetworkChangeObserver(this); |
| registrar_.Add( |
| this, chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED, |
| content::NotificationService::AllSources()); |
| } |
| virtual ~ProxyLifetime() { |
| - net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); |
| + net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
| } |
| virtual void Observe(int type, const content::NotificationSource& source, |
| @@ -69,9 +69,11 @@ class ProxyLifetime |
| } |
| private: |
| - // net::NetworkChangeNotifier::ConnectionTypeObserver implementation. |
| - virtual void OnConnectionTypeChanged( |
| + // net::NetworkChangeNotifier::NetworkChangeObserver implementation. |
| + virtual void OnNetworkChanged( |
| net::NetworkChangeNotifier::ConnectionType type) OVERRIDE { |
| + if (type != net::NetworkChangeNotifier::CONNECTION_NONE) |
| + return; |
|
szym
2013/01/20 06:52:08
This filters out changes online -> offline. Are yo
|
| DCHECK(chromeos::WebSocketProxyController::IsInitiated()); |
| base::AutoLock alk(lock_); |
| if (server_) |