| 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/mapped_host_resolver.h" | 5 #include "net/dns/mapped_host_resolver.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 void MappedHostResolver::SetDefaultAddressFamily(AddressFamily address_family) { | 59 void MappedHostResolver::SetDefaultAddressFamily(AddressFamily address_family) { |
| 60 impl_->SetDefaultAddressFamily(address_family); | 60 impl_->SetDefaultAddressFamily(address_family); |
| 61 } | 61 } |
| 62 | 62 |
| 63 AddressFamily MappedHostResolver::GetDefaultAddressFamily() const { | 63 AddressFamily MappedHostResolver::GetDefaultAddressFamily() const { |
| 64 return impl_->GetDefaultAddressFamily(); | 64 return impl_->GetDefaultAddressFamily(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void MappedHostResolver::SetNoIPv6OnWifi(bool no_ipv6_on_wifi) { |
| 68 impl_->SetNoIPv6OnWifi(no_ipv6_on_wifi); |
| 69 } |
| 70 |
| 71 bool MappedHostResolver::GetNoIPv6OnWifi() { |
| 72 return impl_->GetNoIPv6OnWifi(); |
| 73 } |
| 74 |
| 67 int MappedHostResolver::ApplyRules(RequestInfo* info) const { | 75 int MappedHostResolver::ApplyRules(RequestInfo* info) const { |
| 68 HostPortPair host_port(info->host_port_pair()); | 76 HostPortPair host_port(info->host_port_pair()); |
| 69 if (rules_.RewriteHost(&host_port)) { | 77 if (rules_.RewriteHost(&host_port)) { |
| 70 if (host_port.host() == "~NOTFOUND") | 78 if (host_port.host() == "~NOTFOUND") |
| 71 return ERR_NAME_NOT_RESOLVED; | 79 return ERR_NAME_NOT_RESOLVED; |
| 72 info->set_host_port_pair(host_port); | 80 info->set_host_port_pair(host_port); |
| 73 } | 81 } |
| 74 return OK; | 82 return OK; |
| 75 } | 83 } |
| 76 | 84 |
| 77 } // namespace net | 85 } // namespace net |
| OLD | NEW |