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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 primary_suffix.end(), '.'); | 429 primary_suffix.end(), '.'); |
430 | 430 |
431 for (size_t offset = 0; num_dots >= devolution.level.value; --num_dots) { | 431 for (size_t offset = 0; num_dots >= devolution.level.value; --num_dots) { |
432 offset = primary_suffix.find('.', offset + 1); | 432 offset = primary_suffix.find('.', offset + 1); |
433 config->search.push_back(primary_suffix.substr(offset + 1)); | 433 config->search.push_back(primary_suffix.substr(offset + 1)); |
434 } | 434 } |
435 } | 435 } |
436 | 436 |
437 } // namespace | 437 } // namespace |
438 | 438 |
| 439 DnsSystemSettings::DnsSystemSettings() |
| 440 : policy_search_list(), |
| 441 tcpip_search_list(), |
| 442 tcpip_domain(), |
| 443 primary_dns_suffix(), |
| 444 policy_devolution(), |
| 445 dnscache_devolution(), |
| 446 tcpip_devolution(), |
| 447 append_to_multi_label_name(), |
| 448 have_name_resolution_policy(false) { |
| 449 } |
| 450 |
| 451 DnsSystemSettings::~DnsSystemSettings() { |
| 452 } |
| 453 |
439 bool ParseSearchList(const base::string16& value, | 454 bool ParseSearchList(const base::string16& value, |
440 std::vector<std::string>* output) { | 455 std::vector<std::string>* output) { |
441 DCHECK(output); | 456 DCHECK(output); |
442 if (value.empty()) | 457 if (value.empty()) |
443 return false; | 458 return false; |
444 | 459 |
445 output->clear(); | 460 output->clear(); |
446 | 461 |
447 // If the list includes an empty hostname (",," or ", ,"), it is terminated. | 462 // If the list includes an empty hostname (",," or ", ,"), it is terminated. |
448 // Although nslookup and network connection property tab ignore such | 463 // Although nslookup and network connection property tab ignore such |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 } | 766 } |
752 | 767 |
753 } // namespace internal | 768 } // namespace internal |
754 | 769 |
755 // static | 770 // static |
756 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { | 771 scoped_ptr<DnsConfigService> DnsConfigService::CreateSystemService() { |
757 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin()); | 772 return scoped_ptr<DnsConfigService>(new internal::DnsConfigServiceWin()); |
758 } | 773 } |
759 | 774 |
760 } // namespace net | 775 } // namespace net |
OLD | NEW |