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

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

Issue 10873018: [net] Move DnsConfigService to NetworkChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/gdig/gdig.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 62b67e5c6b11e83a68be72f429f9d5773b152b4d..f756e971bf0a03c1ac365fa65de0d6e93441db15 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -51,29 +51,6 @@ const char* ConnectionTypeToString(
}
}
-std::string DNSDetailToString(unsigned detail) {
- const char kSeparator[] = " | ";
- std::string detail_str;
- if (detail & net::NetworkChangeNotifier::CHANGE_DNS_SETTINGS)
- detail_str += "CHANGE_DNS_SETTINGS";
- if (detail & net::NetworkChangeNotifier::CHANGE_DNS_HOSTS) {
- if (!detail_str.empty())
- detail_str += kSeparator;
- detail_str += "CHANGE_DNS_HOSTS";
- }
- if (detail & net::NetworkChangeNotifier::CHANGE_DNS_WATCH_STARTED) {
- if (!detail_str.empty())
- detail_str += kSeparator;
- detail_str += "CHANGE_DNS_WATCH_STARTED";
- }
- if (detail & net::NetworkChangeNotifier::CHANGE_DNS_WATCH_FAILED) {
- if (!detail_str.empty())
- detail_str += kSeparator;
- detail_str += "CHANGE_DNS_WATCH_FAILED";
- }
- return detail_str;
-}
-
std::string ProxyConfigToString(const net::ProxyConfig& config) {
scoped_ptr<base::Value> config_value(config.ToValue());
std::string str;
@@ -119,8 +96,8 @@ class NetWatcher :
}
// net::NetworkChangeNotifier::DNSObserver implementation.
- virtual void OnDNSChanged(unsigned detail) OVERRIDE {
- LOG(INFO) << "OnDNSChanged(" << DNSDetailToString(detail) << ")";
+ virtual void OnDNSChanged() OVERRIDE {
+ LOG(INFO) << "OnDNSChanged()";
}
// net::ProxyConfigService::Observer implementation.
@@ -187,12 +164,6 @@ int main(int argc, char* argv[]) {
LOG(INFO) << "Watching for network events...";
- if (net::NetworkChangeNotifier::IsWatchingDNS()) {
- LOG(INFO) << "Watching for DNS changes...";
- } else {
- LOG(INFO) << "Not watching for DNS changes";
- }
-
// Start watching for events.
network_loop.Run();
« no previous file with comments | « net/tools/gdig/gdig.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698