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

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

Issue 2812983006: Revert "Add back "default address family" to HostResolver" (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « net/dns/mapped_host_resolver.h ('k') | no next file » | 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) 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 HostCache* MappedHostResolver::GetHostCache() { 51 HostCache* MappedHostResolver::GetHostCache() {
52 return impl_->GetHostCache(); 52 return impl_->GetHostCache();
53 } 53 }
54 54
55 std::unique_ptr<base::Value> MappedHostResolver::GetDnsConfigAsValue() const { 55 std::unique_ptr<base::Value> MappedHostResolver::GetDnsConfigAsValue() const {
56 return impl_->GetDnsConfigAsValue(); 56 return impl_->GetDnsConfigAsValue();
57 } 57 }
58 58
59 void MappedHostResolver::SetDefaultAddressFamily(AddressFamily address_family) {
60 impl_->SetDefaultAddressFamily(address_family);
61 }
62
63 AddressFamily MappedHostResolver::GetDefaultAddressFamily() const {
64 return impl_->GetDefaultAddressFamily();
65 }
66
67 void MappedHostResolver::SetNoIPv6OnWifi(bool no_ipv6_on_wifi) { 59 void MappedHostResolver::SetNoIPv6OnWifi(bool no_ipv6_on_wifi) {
68 impl_->SetNoIPv6OnWifi(no_ipv6_on_wifi); 60 impl_->SetNoIPv6OnWifi(no_ipv6_on_wifi);
69 } 61 }
70 62
71 bool MappedHostResolver::GetNoIPv6OnWifi() { 63 bool MappedHostResolver::GetNoIPv6OnWifi() {
72 return impl_->GetNoIPv6OnWifi(); 64 return impl_->GetNoIPv6OnWifi();
73 } 65 }
74 66
75 int MappedHostResolver::ApplyRules(RequestInfo* info) const { 67 int MappedHostResolver::ApplyRules(RequestInfo* info) const {
76 HostPortPair host_port(info->host_port_pair()); 68 HostPortPair host_port(info->host_port_pair());
77 if (rules_.RewriteHost(&host_port)) { 69 if (rules_.RewriteHost(&host_port)) {
78 if (host_port.host() == "~NOTFOUND") 70 if (host_port.host() == "~NOTFOUND")
79 return ERR_NAME_NOT_RESOLVED; 71 return ERR_NAME_NOT_RESOLVED;
80 info->set_host_port_pair(host_port); 72 info->set_host_port_pair(host_port);
81 } 73 }
82 return OK; 74 return OK;
83 } 75 }
84 76
85 } // namespace net 77 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/mapped_host_resolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698