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

Unified Diff: net/tools/gdig/gdig.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/net.gyp ('k') | net/tools/net_watcher/net_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/gdig/gdig.cc
diff --git a/net/tools/gdig/gdig.cc b/net/tools/gdig/gdig.cc
index 7d1c1274672119f76f6181de6351838a65d71ed1..4306c0071438312547b66de14c13e83c184bfdbc 100644
--- a/net/tools/gdig/gdig.cc
+++ b/net/tools/gdig/gdig.cc
@@ -252,8 +252,8 @@ void GDig::Start() {
OnDnsConfig(dns_config);
} else {
dns_config_service_ = DnsConfigService::CreateSystemService();
- dns_config_service_->Read(base::Bind(&GDig::OnDnsConfig,
- base::Unretained(this)));
+ dns_config_service_->ReadConfig(base::Bind(&GDig::OnDnsConfig,
+ base::Unretained(this)));
timeout_closure_.Reset(base::Bind(&GDig::OnTimeout,
base::Unretained(this)));
MessageLoop::current()->PostDelayedTask(
@@ -277,12 +277,14 @@ void GDig::OnDnsConfig(const DnsConfig& dns_config_const) {
if (timeout_.InMilliseconds() > 0)
dns_config.timeout = timeout_;
- if (print_config_)
+ if (print_config_) {
printf("# Dns Configuration\n"
"%s", DnsConfigToString(dns_config).c_str());
- if (print_hosts_)
+ }
+ if (print_hosts_) {
printf("# Host Database\n"
"%s", DnsHostsToString(dns_config.hosts).c_str());
+ }
// If the user didn't specify a name to resolve we can stop here.
if (domain_name_.length() == 0) {
@@ -297,7 +299,6 @@ void GDig::OnDnsConfig(const DnsConfig& dns_config_const) {
HostCache::CreateDefaultCache(),
PrioritizedDispatcher::Limits(NUM_PRIORITIES, 1),
HostResolverImpl::ProcTaskParams(NULL, 1),
- scoped_ptr<DnsConfigService>(NULL),
dns_client.Pass(),
log_.get()));
« no previous file with comments | « net/net.gyp ('k') | net/tools/net_watcher/net_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698