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 #ifndef NET_BASE_MAPPED_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_MAPPED_HOST_RESOLVER_H_ |
6 #define NET_BASE_MAPPED_HOST_RESOLVER_H_ | 6 #define NET_DNS_MAPPED_HOST_RESOLVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "net/base/host_mapping_rules.h" | 11 #include "net/base/host_mapping_rules.h" |
12 #include "net/base/host_resolver.h" | |
13 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 #include "net/dns/host_resolver.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 // This class wraps an existing HostResolver instance, but modifies the | 17 // This class wraps an existing HostResolver instance, but modifies the |
18 // request before passing it off to |impl|. This is different from | 18 // request before passing it off to |impl|. This is different from |
19 // MockHostResolver which does the remapping at the HostResolverProc | 19 // MockHostResolver which does the remapping at the HostResolverProc |
20 // layer, so it is able to preserve the effectiveness of the cache. | 20 // layer, so it is able to preserve the effectiveness of the cache. |
21 class NET_EXPORT MappedHostResolver : public HostResolver { | 21 class NET_EXPORT MappedHostResolver : public HostResolver { |
22 public: | 22 public: |
23 // Creates a MappedHostResolver that forwards all of its requests through | 23 // Creates a MappedHostResolver that forwards all of its requests through |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // the network error code that the hostname's resolution mapped to. | 62 // the network error code that the hostname's resolution mapped to. |
63 int ApplyRules(RequestInfo* info) const; | 63 int ApplyRules(RequestInfo* info) const; |
64 | 64 |
65 scoped_ptr<HostResolver> impl_; | 65 scoped_ptr<HostResolver> impl_; |
66 | 66 |
67 HostMappingRules rules_; | 67 HostMappingRules rules_; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace net | 70 } // namespace net |
71 | 71 |
72 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ | 72 #endif // NET_DNS_MAPPED_HOST_RESOLVER_H_ |
OLD | NEW |