| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // HostResolver methods: | 26 // HostResolver methods: |
| 27 virtual int Resolve(const RequestInfo& info, | 27 virtual int Resolve(const RequestInfo& info, |
| 28 AddressList* addresses, | 28 AddressList* addresses, |
| 29 CompletionCallback* callback, | 29 CompletionCallback* callback, |
| 30 RequestHandle* out_req, | 30 RequestHandle* out_req, |
| 31 const BoundNetLog& net_log); | 31 const BoundNetLog& net_log); |
| 32 virtual void CancelRequest(RequestHandle req); | 32 virtual void CancelRequest(RequestHandle req); |
| 33 virtual void AddObserver(Observer* observer); | 33 virtual void AddObserver(Observer* observer); |
| 34 virtual void RemoveObserver(Observer* observer); | 34 virtual void RemoveObserver(Observer* observer); |
| 35 virtual void Flush() { impl_->Flush(); } |
| 35 virtual HostResolverImpl* GetAsHostResolverImpl(); | 36 virtual HostResolverImpl* GetAsHostResolverImpl(); |
| 36 | 37 |
| 37 // Adds a rule to this mapper. The format of the rule can be one of: | 38 // Adds a rule to this mapper. The format of the rule can be one of: |
| 38 // | 39 // |
| 39 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>] | 40 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>] |
| 40 // "EXCLUDE" <hostname_pattern> | 41 // "EXCLUDE" <hostname_pattern> |
| 41 // | 42 // |
| 42 // The <replacement_host> can be either a hostname, or an IP address literal. | 43 // The <replacement_host> can be either a hostname, or an IP address literal. |
| 43 // | 44 // |
| 44 // Returns true if the rule was successfully parsed and added. | 45 // Returns true if the rule was successfully parsed and added. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 | 72 |
| 72 scoped_refptr<HostResolver> impl_; | 73 scoped_refptr<HostResolver> impl_; |
| 73 | 74 |
| 74 MapRuleList map_rules_; | 75 MapRuleList map_rules_; |
| 75 ExclusionRuleList exclusion_rules_; | 76 ExclusionRuleList exclusion_rules_; |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 } // namespace net | 79 } // namespace net |
| 79 | 80 |
| 80 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ | 81 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ |
| OLD | NEW |