| OLD | NEW |
| 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 #include "net/dns/dns_config_service_win.h" | 5 #include "net/dns/dns_config_service_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 TCHAR buffer[MAX_PATH]; | 448 TCHAR buffer[MAX_PATH]; |
| 449 UINT rc = GetSystemDirectory(buffer, MAX_PATH); | 449 UINT rc = GetSystemDirectory(buffer, MAX_PATH); |
| 450 DCHECK(0 < rc && rc < MAX_PATH); | 450 DCHECK(0 < rc && rc < MAX_PATH); |
| 451 FilePath hosts_path = FilePath(buffer). | 451 FilePath hosts_path = FilePath(buffer). |
| 452 Append(FILE_PATH_LITERAL("drivers\\etc\\hosts")); | 452 Append(FILE_PATH_LITERAL("drivers\\etc\\hosts")); |
| 453 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this)); | 453 hosts_watcher_->StartWatch(hosts_path, new DnsHostsReader(hosts_path, this)); |
| 454 } | 454 } |
| 455 | 455 |
| 456 // static | 456 // static |
| 457 DnsConfigService* DnsConfigService::CreateSystemService() { | 457 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { |
| 458 return new DnsConfigServiceWin(); | 458 return scoped_ptr<DnsConfigService>(new DnsConfigServiceWin()); |
| 459 } | 459 } |
| 460 | 460 |
| 461 } // namespace net | 461 } // namespace net |
| 462 | 462 |
| OLD | NEW |