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

Unified Diff: net/tools/net_watcher/net_watcher.cc

Issue 11360108: Start calculating new combined NetworkChangeNotifier signal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch to default argument constructor Created 8 years 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 | « net/base/network_change_notifier_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/net_watcher/net_watcher.cc
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index b5aa4e37dc67c5d453d0d9bac434c2ded559b013..6950b5d231144f78b5610aee3d8ae313624e3097 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -81,6 +81,7 @@ class NetWatcher :
public net::NetworkChangeNotifier::IPAddressObserver,
public net::NetworkChangeNotifier::ConnectionTypeObserver,
public net::NetworkChangeNotifier::DNSObserver,
+ public net::NetworkChangeNotifier::NetworkChangeObserver,
public net::ProxyConfigService::Observer {
public:
NetWatcher() {}
@@ -104,6 +105,13 @@ class NetWatcher :
LOG(INFO) << "OnDNSChanged()";
}
+ // net::NetworkChangeNotifier::NetworkChangeObserver implementation.
+ virtual void OnNetworkChanged(
+ net::NetworkChangeNotifier::ConnectionType type) OVERRIDE {
+ LOG(INFO) << "OnNetworkChanged("
+ << ConnectionTypeToString(type) << ")";
+ }
+
// net::ProxyConfigService::Observer implementation.
virtual void OnProxyConfigChanged(
const net::ProxyConfig& config,
@@ -155,6 +163,7 @@ int main(int argc, char* argv[]) {
net::NetworkChangeNotifier::AddIPAddressObserver(&net_watcher);
net::NetworkChangeNotifier::AddConnectionTypeObserver(&net_watcher);
net::NetworkChangeNotifier::AddDNSObserver(&net_watcher);
+ net::NetworkChangeNotifier::AddNetworkChangeObserver(&net_watcher);
proxy_config_service->AddObserver(&net_watcher);
@@ -182,6 +191,7 @@ int main(int argc, char* argv[]) {
net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
+ net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher);
return 0;
}
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698