OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ | 5 #ifndef NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ |
6 #define NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ | 6 #define NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // constructor takes ownership of |resolver|. | 28 // constructor takes ownership of |resolver|. |
29 explicit SingleThreadedProxyResolver(ProxyResolver* resolver); | 29 explicit SingleThreadedProxyResolver(ProxyResolver* resolver); |
30 | 30 |
31 virtual ~SingleThreadedProxyResolver(); | 31 virtual ~SingleThreadedProxyResolver(); |
32 | 32 |
33 // ProxyResolver implementation: | 33 // ProxyResolver implementation: |
34 virtual int GetProxyForURL(const GURL& url, | 34 virtual int GetProxyForURL(const GURL& url, |
35 ProxyInfo* results, | 35 ProxyInfo* results, |
36 CompletionCallback* callback, | 36 CompletionCallback* callback, |
37 RequestHandle* request, | 37 RequestHandle* request, |
38 LoadLog* load_log); | 38 const BoundNetLog& net_log); |
39 virtual void CancelRequest(RequestHandle request); | 39 virtual void CancelRequest(RequestHandle request); |
40 virtual void CancelSetPacScript(); | 40 virtual void CancelSetPacScript(); |
41 virtual void PurgeMemory(); | 41 virtual void PurgeMemory(); |
42 | 42 |
43 protected: | 43 protected: |
44 // The wrapped (synchronous) ProxyResolver. | 44 // The wrapped (synchronous) ProxyResolver. |
45 ProxyResolver* resolver() { return resolver_.get(); } | 45 ProxyResolver* resolver() { return resolver_.get(); } |
46 | 46 |
47 private: | 47 private: |
48 // Refcounted helper class that bridges between origin thread and worker | 48 // Refcounted helper class that bridges between origin thread and worker |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // executing on |thread_|. | 85 // executing on |thread_|. |
86 scoped_ptr<base::Thread> thread_; | 86 scoped_ptr<base::Thread> thread_; |
87 | 87 |
88 PendingJobsQueue pending_jobs_; | 88 PendingJobsQueue pending_jobs_; |
89 scoped_refptr<SetPacScriptTask> outstanding_set_pac_script_task_; | 89 scoped_refptr<SetPacScriptTask> outstanding_set_pac_script_task_; |
90 }; | 90 }; |
91 | 91 |
92 } // namespace net | 92 } // namespace net |
93 | 93 |
94 #endif // NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ | 94 #endif // NET_PROXY_SINGLE_THREADED_PROXY_RESOLVER_H_ |
OLD | NEW |