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

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

Issue 11364224: FTP: Open a fresh data connection after a command error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years, 1 month 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 | « no previous file | 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) 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 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 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 STATE_DATA_CONNECT, 118 STATE_DATA_CONNECT,
119 STATE_DATA_CONNECT_COMPLETE, 119 STATE_DATA_CONNECT_COMPLETE,
120 STATE_DATA_READ, 120 STATE_DATA_READ,
121 STATE_DATA_READ_COMPLETE, 121 STATE_DATA_READ_COMPLETE,
122 STATE_NONE 122 STATE_NONE
123 }; 123 };
124 124
125 // Resets the members of the transaction so it can be restarted. 125 // Resets the members of the transaction so it can be restarted.
126 void ResetStateForRestart(); 126 void ResetStateForRestart();
127 127
128 // Resets the data connection after an error and switches to |next_state|.
129 void ResetDataConnectionAfterError(State next_state);
130
128 void DoCallback(int result); 131 void DoCallback(int result);
129 void OnIOComplete(int result); 132 void OnIOComplete(int result);
130 133
131 // Executes correct ProcessResponse + command_name function based on last 134 // Executes correct ProcessResponse + command_name function based on last
132 // issued command. Returns error code. 135 // issued command. Returns error code.
133 int ProcessCtrlResponse(); 136 int ProcessCtrlResponse();
134 137
135 int SendFtpCommand(const std::string& command, 138 int SendFtpCommand(const std::string& command,
136 const std::string& command_for_log, 139 const std::string& command_for_log,
137 Command cmd); 140 Command cmd);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 std::string current_remote_directory_; 245 std::string current_remote_directory_;
243 246
244 int data_connection_port_; 247 int data_connection_port_;
245 248
246 ClientSocketFactory* socket_factory_; 249 ClientSocketFactory* socket_factory_;
247 250
248 scoped_ptr<StreamSocket> ctrl_socket_; 251 scoped_ptr<StreamSocket> ctrl_socket_;
249 scoped_ptr<StreamSocket> data_socket_; 252 scoped_ptr<StreamSocket> data_socket_;
250 253
251 State next_state_; 254 State next_state_;
255
256 // State to switch to after data connection is complete.
257 State state_after_data_connect_complete_;
252 }; 258 };
253 259
254 } // namespace net 260 } // namespace net
255 261
256 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_ 262 #endif // NET_FTP_FTP_NETWORK_TRANSACTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698