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

Side by Side Diff: net/dns/dns_config_service_win.cc

Issue 9190031: DnsClient refactoring + features (timeout, suffix search, server rotation). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delinted. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/dns/dns_config_service.h ('k') | net/dns/dns_protocol.h » ('j') | 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) 2011 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 #include "net/dns/dns_config_service_win.h" 5 #include "net/dns/dns_config_service_win.h"
6 6
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <string> 10 #include <string>
11 11
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Should be called on WorkerPool. 233 // Should be called on WorkerPool.
234 dns_config_ = DnsConfig(); 234 dns_config_ = DnsConfig();
235 if (!ReadIpHelper(&dns_config_)) 235 if (!ReadIpHelper(&dns_config_))
236 return; // no point reading the rest 236 return; // no point reading the rest
237 237
238 // check global registry overrides 238 // check global registry overrides
239 if (!ReadSearchList(policy_watcher_, &dns_config_)) 239 if (!ReadSearchList(policy_watcher_, &dns_config_))
240 ReadSearchList(tcpip_watcher_, &dns_config_); 240 ReadSearchList(tcpip_watcher_, &dns_config_);
241 241
242 // TODO(szym): add support for DNS suffix devolution BUG=99510 242 // TODO(szym): add support for DNS suffix devolution BUG=99510
243 // TODO(szym): read AppendToMultiLabelName to determine ndots BUG=109902
243 } 244 }
244 245
245 void OnWorkFinished() OVERRIDE { 246 void OnWorkFinished() OVERRIDE {
246 DCHECK(loop()->BelongsToCurrentThread()); 247 DCHECK(loop()->BelongsToCurrentThread());
247 DCHECK(!IsCancelled()); 248 DCHECK(!IsCancelled());
248 if (dns_config_.IsValid()) { 249 if (dns_config_.IsValid()) {
249 service_->OnConfigRead(dns_config_); 250 service_->OnConfigRead(dns_config_);
250 } else { 251 } else {
251 LOG(WARNING) << "Failed to read name servers from registry"; 252 LOG(WARNING) << "Failed to read name servers from registry";
252 } 253 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this)); 285 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this));
285 } 286 }
286 287
287 // static 288 // static
288 DnsConfigService* DnsConfigService::CreateSystemService() { 289 DnsConfigService* DnsConfigService::CreateSystemService() {
289 return new DnsConfigServiceWin(); 290 return new DnsConfigServiceWin();
290 } 291 }
291 292
292 } // namespace net 293 } // namespace net
293 294
OLDNEW
« no previous file with comments | « net/dns/dns_config_service.h ('k') | net/dns/dns_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698