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

Side by Side Diff: net/tools/net_watcher/net_watcher.cc

Issue 2253023002: Add more verbose description of net_watcher tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This is a small utility that watches for and logs network changes. 5 // This is a small utility that watches for and logs network changes.
6 // It prints out the current network connection type and proxy configuration
7 // upon startup and then prints out changes as they happen.
8 // It's useful for testing NetworkChangeNotifier and ProxyConfigService.
9 // The only command line option supported is --ignore-netif which is followed
10 // by a comma seperated list of network interfaces to ignore when computing
11 // connection type; this option is only supported on linux.
6 12
7 #include <memory> 13 #include <memory>
8 #include <string> 14 #include <string>
9 #include <unordered_set> 15 #include <unordered_set>
10 16
11 #include "base/at_exit.h" 17 #include "base/at_exit.h"
12 #include "base/command_line.h" 18 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
14 #include "base/json/json_writer.h" 20 #include "base/json/json_writer.h"
15 #include "base/logging.h" 21 #include "base/logging.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 proxy_config_service->RemoveObserver(&net_watcher); 225 proxy_config_service->RemoveObserver(&net_watcher);
220 226
221 // Uses |network_change_notifier|. 227 // Uses |network_change_notifier|.
222 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher); 228 net::NetworkChangeNotifier::RemoveDNSObserver(&net_watcher);
223 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher); 229 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(&net_watcher);
224 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher); 230 net::NetworkChangeNotifier::RemoveIPAddressObserver(&net_watcher);
225 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher); 231 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(&net_watcher);
226 232
227 return 0; 233 return 0;
228 } 234 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698