| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 // Creates a MappedHostResolver that forwards all of its requests through | 22 // Creates a MappedHostResolver that forwards all of its requests through |
| 23 // |impl|. | 23 // |impl|. |
| 24 explicit MappedHostResolver(HostResolver* impl); | 24 explicit MappedHostResolver(HostResolver* impl); |
| 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 LoadLog* load_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 HostResolverImpl* GetAsHostResolverImpl(); | 35 virtual HostResolverImpl* GetAsHostResolverImpl(); |
| 36 | 36 |
| 37 // Adds a rule to this mapper. The format of the rule can be one of: | 37 // Adds a rule to this mapper. The format of the rule can be one of: |
| 38 // | 38 // |
| 39 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>] | 39 // "MAP" <hostname_pattern> <replacement_host> [":" <replacement_port>] |
| 40 // "EXCLUDE" <hostname_pattern> | 40 // "EXCLUDE" <hostname_pattern> |
| 41 // | 41 // |
| (...skipping 29 matching lines...) Expand all Loading... |
| 71 | 71 |
| 72 scoped_refptr<HostResolver> impl_; | 72 scoped_refptr<HostResolver> impl_; |
| 73 | 73 |
| 74 MapRuleList map_rules_; | 74 MapRuleList map_rules_; |
| 75 ExclusionRuleList exclusion_rules_; | 75 ExclusionRuleList exclusion_rules_; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace net | 78 } // namespace net |
| 79 | 79 |
| 80 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ | 80 #endif // NET_BASE_MAPPED_HOST_RESOLVER_H_ |
| OLD | NEW |