OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ | 5 #ifndef CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ |
6 #define CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ | 6 #define CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 // the stored IPC::Message pointers for pending requests. | 31 // the stored IPC::Message pointers for pending requests. |
32 // | 32 // |
33 // This object is expected to live on the IO thread. | 33 // This object is expected to live on the IO thread. |
34 class CONTENT_EXPORT ResolveProxyMsgHelper : public BrowserMessageFilter { | 34 class CONTENT_EXPORT ResolveProxyMsgHelper : public BrowserMessageFilter { |
35 public: | 35 public: |
36 explicit ResolveProxyMsgHelper(net::URLRequestContextGetter* getter); | 36 explicit ResolveProxyMsgHelper(net::URLRequestContextGetter* getter); |
37 // Constructor used by unittests. | 37 // Constructor used by unittests. |
38 explicit ResolveProxyMsgHelper(net::ProxyService* proxy_service); | 38 explicit ResolveProxyMsgHelper(net::ProxyService* proxy_service); |
39 | 39 |
40 // BrowserMessageFilter implementation | 40 // BrowserMessageFilter implementation |
41 virtual bool OnMessageReceived(const IPC::Message& message, | 41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
42 bool* message_was_ok) OVERRIDE; | |
43 | 42 |
44 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); | 43 void OnResolveProxy(const GURL& url, IPC::Message* reply_msg); |
45 | 44 |
46 protected: | 45 protected: |
47 // Destruction cancels the current outstanding request, and clears the | 46 // Destruction cancels the current outstanding request, and clears the |
48 // pending queue. | 47 // pending queue. |
49 virtual ~ResolveProxyMsgHelper(); | 48 virtual ~ResolveProxyMsgHelper(); |
50 | 49 |
51 private: | 50 private: |
52 // Callback for the ProxyService (bound to |callback_|). | 51 // Callback for the ProxyService (bound to |callback_|). |
(...skipping 25 matching lines...) Expand all Loading... |
78 typedef std::deque<PendingRequest> PendingRequestList; | 77 typedef std::deque<PendingRequest> PendingRequestList; |
79 PendingRequestList pending_requests_; | 78 PendingRequestList pending_requests_; |
80 | 79 |
81 scoped_refptr<net::URLRequestContextGetter> context_getter_; | 80 scoped_refptr<net::URLRequestContextGetter> context_getter_; |
82 net::ProxyService* proxy_service_; | 81 net::ProxyService* proxy_service_; |
83 }; | 82 }; |
84 | 83 |
85 } // namespace content | 84 } // namespace content |
86 | 85 |
87 #endif // CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ | 86 #endif // CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_ |
OLD | NEW |