Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: net/proxy/dhcp_proxy_script_adapter_fetcher_win.h

Issue 8985012: base::Bind: Convert net/proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more include. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_ 5 #ifndef NET_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_
6 #define NET_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_ 6 #define NET_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 // Starts a fetch. On completion (but not cancellation), |callback| 37 // Starts a fetch. On completion (but not cancellation), |callback|
38 // will be invoked with the network error indicating success or failure 38 // will be invoked with the network error indicating success or failure
39 // of fetching a DHCP-configured PAC file on this adapter. 39 // of fetching a DHCP-configured PAC file on this adapter.
40 // 40 //
41 // On completion, results can be obtained via |GetPacScript()|, |GetPacURL()|. 41 // On completion, results can be obtained via |GetPacScript()|, |GetPacURL()|.
42 // 42 //
43 // You may only call Fetch() once on a given instance of 43 // You may only call Fetch() once on a given instance of
44 // DhcpProxyScriptAdapterFetcher. 44 // DhcpProxyScriptAdapterFetcher.
45 virtual void Fetch(const std::string& adapter_name, 45 virtual void Fetch(const std::string& adapter_name,
46 OldCompletionCallback* callback); 46 const net::CompletionCallback& callback);
47 47
48 // Cancels the fetch on this adapter. 48 // Cancels the fetch on this adapter.
49 virtual void Cancel(); 49 virtual void Cancel();
50 50
51 // Returns true if in the FINISH state (not CANCEL). 51 // Returns true if in the FINISH state (not CANCEL).
52 virtual bool DidFinish() const; 52 virtual bool DidFinish() const;
53 53
54 // Returns the network error indicating the result of the fetch. Will 54 // Returns the network error indicating the result of the fetch. Will
55 // return IO_PENDING until the fetch is complete or cancelled. This is 55 // return IO_PENDING until the fetch is complete or cancelled. This is
56 // the same network error passed to the |callback| provided to |Fetch()|. 56 // the same network error passed to the |callback| provided to |Fetch()|.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 int result_; 152 int result_;
153 153
154 // Empty string or the PAC script downloaded. 154 // Empty string or the PAC script downloaded.
155 string16 pac_script_; 155 string16 pac_script_;
156 156
157 // Empty URL or the PAC URL configured in DHCP. 157 // Empty URL or the PAC URL configured in DHCP.
158 GURL pac_url_; 158 GURL pac_url_;
159 159
160 // Callback to let our client know we're done. Invalid in states 160 // Callback to let our client know we're done. Invalid in states
161 // START, FINISH and CANCEL. 161 // START, FINISH and CANCEL.
162 OldCompletionCallback* callback_; 162 net::CompletionCallback callback_;
163 163
164 // Fetcher to retrieve PAC files once URL is known. 164 // Fetcher to retrieve PAC files once URL is known.
165 scoped_ptr<ProxyScriptFetcher> script_fetcher_; 165 scoped_ptr<ProxyScriptFetcher> script_fetcher_;
166 166
167 // Callback from the script fetcher.
168 OldCompletionCallbackImpl<DhcpProxyScriptAdapterFetcher>
169 script_fetcher_callback_;
170
171 // Implements a timeout on the call to the Win32 DHCP API. 167 // Implements a timeout on the call to the Win32 DHCP API.
172 base::OneShotTimer<DhcpProxyScriptAdapterFetcher> wait_timer_; 168 base::OneShotTimer<DhcpProxyScriptAdapterFetcher> wait_timer_;
173 169
174 scoped_refptr<URLRequestContext> url_request_context_; 170 scoped_refptr<URLRequestContext> url_request_context_;
175 171
176 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptAdapterFetcher); 172 DISALLOW_IMPLICIT_CONSTRUCTORS(DhcpProxyScriptAdapterFetcher);
177 }; 173 };
178 174
179 } // namespace net 175 } // namespace net
180 176
181 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_ 177 #endif // NET_PROXY_DHCP_PROXY_SCRIPT_ADAPTER_FETCHER_WIN_H_
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/proxy/dhcp_proxy_script_adapter_fetcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698