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_MOCK_HOST_RESOLVER_H_ | 5 #ifndef NET_BASE_MOCK_HOST_RESOLVER_H_ |
6 #define NET_BASE_MOCK_HOST_RESOLVER_H_ | 6 #define NET_BASE_MOCK_HOST_RESOLVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 size_t max_pending_requests) { | 56 size_t max_pending_requests) { |
57 impl_->SetPoolConstraints( | 57 impl_->SetPoolConstraints( |
58 pool_index, max_outstanding_jobs, max_pending_requests); | 58 pool_index, max_outstanding_jobs, max_pending_requests); |
59 } | 59 } |
60 | 60 |
61 // HostResolver methods: | 61 // HostResolver methods: |
62 virtual int Resolve(const RequestInfo& info, | 62 virtual int Resolve(const RequestInfo& info, |
63 AddressList* addresses, | 63 AddressList* addresses, |
64 CompletionCallback* callback, | 64 CompletionCallback* callback, |
65 RequestHandle* out_req, | 65 RequestHandle* out_req, |
66 const BoundNetLog& net_log); | 66 const BoundNetLog& net_log) OVERRIDE; |
67 virtual void CancelRequest(RequestHandle req); | 67 virtual int ResolveFromCache(const RequestInfo& info, |
68 virtual void AddObserver(Observer* observer); | 68 AddressList* addresses, |
69 virtual void RemoveObserver(Observer* observer); | 69 const BoundNetLog& net_log) OVERRIDE; |
| 70 virtual void CancelRequest(RequestHandle req) OVERRIDE; |
| 71 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 72 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
70 | 73 |
71 protected: | 74 protected: |
72 MockHostResolverBase(bool use_caching); | 75 MockHostResolverBase(bool use_caching); |
73 | 76 |
74 scoped_ptr<HostResolverImpl> impl_; | 77 scoped_ptr<HostResolverImpl> impl_; |
75 scoped_refptr<RuleBasedHostResolverProc> rules_; | 78 scoped_refptr<RuleBasedHostResolverProc> rules_; |
76 bool synchronous_mode_; | 79 bool synchronous_mode_; |
77 bool use_caching_; | 80 bool use_caching_; |
78 | 81 |
79 private: | 82 private: |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 void Init(HostResolverProc* proc); | 193 void Init(HostResolverProc* proc); |
191 | 194 |
192 private: | 195 private: |
193 scoped_refptr<HostResolverProc> current_proc_; | 196 scoped_refptr<HostResolverProc> current_proc_; |
194 scoped_refptr<HostResolverProc> previous_proc_; | 197 scoped_refptr<HostResolverProc> previous_proc_; |
195 }; | 198 }; |
196 | 199 |
197 } // namespace net | 200 } // namespace net |
198 | 201 |
199 #endif // NET_BASE_MOCK_HOST_RESOLVER_H_ | 202 #endif // NET_BASE_MOCK_HOST_RESOLVER_H_ |
OLD | NEW |