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

Side by Side Diff: net/ftp/ftp_network_transaction.h

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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
« no previous file with comments | « net/dns/dns_transaction.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FTP_FTP_NETWORK_TRANSACTION_H_ 5 #ifndef NET_FTP_FTP_NETWORK_TRANSACTION_H_
6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_ 6 #define NET_FTP_FTP_NETWORK_TRANSACTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 16 matching lines...) Expand all
27 class FtpNetworkSession; 27 class FtpNetworkSession;
28 class StreamSocket; 28 class StreamSocket;
29 29
30 class NET_EXPORT_PRIVATE FtpNetworkTransaction : public FtpTransaction { 30 class NET_EXPORT_PRIVATE FtpNetworkTransaction : public FtpTransaction {
31 public: 31 public:
32 FtpNetworkTransaction(FtpNetworkSession* session, 32 FtpNetworkTransaction(FtpNetworkSession* session,
33 ClientSocketFactory* socket_factory); 33 ClientSocketFactory* socket_factory);
34 virtual ~FtpNetworkTransaction(); 34 virtual ~FtpNetworkTransaction();
35 35
36 virtual int Stop(int error); 36 virtual int Stop(int error);
37 virtual int RestartIgnoringLastError(OldCompletionCallback* callback); 37 virtual int RestartIgnoringLastError(const CompletionCallback& callback);
38 38
39 // FtpTransaction methods: 39 // FtpTransaction methods:
40 virtual int Start(const FtpRequestInfo* request_info, 40 virtual int Start(const FtpRequestInfo* request_info,
41 OldCompletionCallback* callback, 41 const CompletionCallback& callback,
42 const BoundNetLog& net_log) OVERRIDE; 42 const BoundNetLog& net_log) OVERRIDE;
43 virtual int RestartWithAuth(const AuthCredentials& credentials, 43 virtual int RestartWithAuth(const AuthCredentials& credentials,
44 OldCompletionCallback* callback) OVERRIDE; 44 const CompletionCallback& callback) OVERRIDE;
45 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback) 45 virtual int Read(IOBuffer* buf, int buf_len,
46 OVERRIDE; 46 const CompletionCallback& callback) OVERRIDE;
47 virtual const FtpResponseInfo* GetResponseInfo() const OVERRIDE; 47 virtual const FtpResponseInfo* GetResponseInfo() const OVERRIDE;
48 virtual LoadState GetLoadState() const OVERRIDE; 48 virtual LoadState GetLoadState() const OVERRIDE;
49 virtual uint64 GetUploadProgress() const OVERRIDE; 49 virtual uint64 GetUploadProgress() const OVERRIDE;
50 50
51 private: 51 private:
52 enum Command { 52 enum Command {
53 COMMAND_NONE, 53 COMMAND_NONE,
54 COMMAND_USER, 54 COMMAND_USER,
55 COMMAND_PASS, 55 COMMAND_PASS,
56 COMMAND_SYST, 56 COMMAND_SYST,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 182
183 int DoDataConnect(); 183 int DoDataConnect();
184 int DoDataConnectComplete(int result); 184 int DoDataConnectComplete(int result);
185 int DoDataRead(); 185 int DoDataRead();
186 int DoDataReadComplete(int result); 186 int DoDataReadComplete(int result);
187 187
188 void RecordDataConnectionError(int result); 188 void RecordDataConnectionError(int result);
189 189
190 Command command_sent_; 190 Command command_sent_;
191 191
192 OldCompletionCallbackImpl<FtpNetworkTransaction> io_callback_; 192 CompletionCallback io_callback_;
193 OldCompletionCallback* user_callback_; 193 CompletionCallback user_callback_;
194 194
195 scoped_refptr<FtpNetworkSession> session_; 195 scoped_refptr<FtpNetworkSession> session_;
196 196
197 BoundNetLog net_log_; 197 BoundNetLog net_log_;
198 const FtpRequestInfo* request_; 198 const FtpRequestInfo* request_;
199 FtpResponseInfo response_; 199 FtpResponseInfo response_;
200 200
201 // Cancels the outstanding request on destruction. 201 // Cancels the outstanding request on destruction.
202 SingleRequestHostResolver resolver_; 202 SingleRequestHostResolver resolver_;
203 AddressList addresses_; 203 AddressList addresses_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 scoped_ptr<StreamSocket> ctrl_socket_; 244 scoped_ptr<StreamSocket> ctrl_socket_;
245 scoped_ptr<StreamSocket> data_socket_; 245 scoped_ptr<StreamSocket> data_socket_;
246 246
247 State next_state_; 247 State next_state_;
248 }; 248 };
249 249
250 } // namespace net 250 } // namespace net
251 251
252 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ 252 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « net/dns/dns_transaction.cc ('k') | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698