| 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_DNS_MAPPED_HOST_RESOLVER_H_ | 5 #ifndef NET_DNS_MAPPED_HOST_RESOLVER_H_ |
| 6 #define NET_DNS_MAPPED_HOST_RESOLVER_H_ | 6 #define NET_DNS_MAPPED_HOST_RESOLVER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 AddressList* addresses, | 50 AddressList* addresses, |
| 51 const CompletionCallback& callback, | 51 const CompletionCallback& callback, |
| 52 std::unique_ptr<Request>* request, | 52 std::unique_ptr<Request>* request, |
| 53 const NetLogWithSource& net_log) override; | 53 const NetLogWithSource& net_log) override; |
| 54 int ResolveFromCache(const RequestInfo& info, | 54 int ResolveFromCache(const RequestInfo& info, |
| 55 AddressList* addresses, | 55 AddressList* addresses, |
| 56 const NetLogWithSource& net_log) override; | 56 const NetLogWithSource& net_log) override; |
| 57 void SetDnsClientEnabled(bool enabled) override; | 57 void SetDnsClientEnabled(bool enabled) override; |
| 58 HostCache* GetHostCache() override; | 58 HostCache* GetHostCache() override; |
| 59 std::unique_ptr<base::Value> GetDnsConfigAsValue() const override; | 59 std::unique_ptr<base::Value> GetDnsConfigAsValue() const override; |
| 60 void SetDefaultAddressFamily(AddressFamily address_family) override; |
| 61 AddressFamily GetDefaultAddressFamily() const override; |
| 60 | 62 |
| 61 private: | 63 private: |
| 62 // Modify the request |info| according to |rules_|. Returns either OK or | 64 // Modify the request |info| according to |rules_|. Returns either OK or |
| 63 // the network error code that the hostname's resolution mapped to. | 65 // the network error code that the hostname's resolution mapped to. |
| 64 int ApplyRules(RequestInfo* info) const; | 66 int ApplyRules(RequestInfo* info) const; |
| 65 | 67 |
| 66 std::unique_ptr<HostResolver> impl_; | 68 std::unique_ptr<HostResolver> impl_; |
| 67 | 69 |
| 68 HostMappingRules rules_; | 70 HostMappingRules rules_; |
| 69 }; | 71 }; |
| 70 | 72 |
| 71 } // namespace net | 73 } // namespace net |
| 72 | 74 |
| 73 #endif // NET_DNS_MAPPED_HOST_RESOLVER_H_ | 75 #endif // NET_DNS_MAPPED_HOST_RESOLVER_H_ |
| OLD | NEW |