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

Unified Diff: chrome/browser/chromeos/web_socket_proxy_controller.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: 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_)

Powered by Google App Engine
This is Rietveld 408576698