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/base/mapped_host_resolver.h" | 5 #include "net/dns/mapped_host_resolver.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "net/base/host_port_pair.h" | 8 #include "net/base/host_port_pair.h" |
9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
10 #include "net/base/net_util.h" | 10 #include "net/base/net_util.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 MappedHostResolver::MappedHostResolver(scoped_ptr<HostResolver> impl) | 14 MappedHostResolver::MappedHostResolver(scoped_ptr<HostResolver> impl) |
15 : impl_(impl.Pass()) { | 15 : impl_(impl.Pass()) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 HostPortPair host_port(info->host_port_pair()); | 58 HostPortPair host_port(info->host_port_pair()); |
59 if (rules_.RewriteHost(&host_port)) { | 59 if (rules_.RewriteHost(&host_port)) { |
60 if (host_port.host() == "~NOTFOUND") | 60 if (host_port.host() == "~NOTFOUND") |
61 return ERR_NAME_NOT_RESOLVED; | 61 return ERR_NAME_NOT_RESOLVED; |
62 info->set_host_port_pair(host_port); | 62 info->set_host_port_pair(host_port); |
63 } | 63 } |
64 return OK; | 64 return OK; |
65 } | 65 } |
66 | 66 |
67 } // namespace net | 67 } // namespace net |
OLD | NEW |