OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BASE_MAPPED_HOST_RESOLVER_H_ |
6 #define NET_BASE_MAPPED_HOST_RESOLVER_H_ | 6 #define NET_BASE_MAPPED_HOST_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 } | 39 } |
40 | 40 |
41 // Takes a comma separated list of rules, and assigns them to this resolver. | 41 // Takes a comma separated list of rules, and assigns them to this resolver. |
42 void SetRulesFromString(const std::string& rules_string) { | 42 void SetRulesFromString(const std::string& rules_string) { |
43 rules_.SetRulesFromString(rules_string); | 43 rules_.SetRulesFromString(rules_string); |
44 } | 44 } |
45 | 45 |
46 // HostResolver methods: | 46 // HostResolver methods: |
47 virtual int Resolve(const RequestInfo& info, | 47 virtual int Resolve(const RequestInfo& info, |
48 AddressList* addresses, | 48 AddressList* addresses, |
49 OldCompletionCallback* callback, | 49 const CompletionCallback& callback, |
50 RequestHandle* out_req, | 50 RequestHandle* out_req, |
51 const BoundNetLog& net_log) OVERRIDE; | 51 const BoundNetLog& net_log) OVERRIDE; |
52 virtual int ResolveFromCache(const RequestInfo& info, | 52 virtual int ResolveFromCache(const RequestInfo& info, |
53 AddressList* addresses, | 53 AddressList* addresses, |
54 const BoundNetLog& net_log) OVERRIDE; | 54 const BoundNetLog& net_log) OVERRIDE; |
55 virtual void CancelRequest(RequestHandle req) OVERRIDE; | 55 virtual void CancelRequest(RequestHandle req) OVERRIDE; |
56 virtual void ProbeIPv6Support() OVERRIDE; | 56 virtual void ProbeIPv6Support() OVERRIDE; |
57 virtual HostCache* GetHostCache() OVERRIDE; | 57 virtual HostCache* GetHostCache() OVERRIDE; |
58 | 58 |
59 private: | 59 private: |
60 scoped_ptr<HostResolver> impl_; | 60 scoped_ptr<HostResolver> impl_; |
61 | 61 |
62 HostMappingRules rules_; | 62 HostMappingRules rules_; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace net | 65 } // namespace net |
66 | 66 |
67 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ | 67 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ |
OLD | NEW |