diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 22:47:11 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 22:47:11 +0000 |
commit | d100e44f64d4abb2cc244cb61bb736c602146767 (patch) | |
tree | bfdd81d5424b2335e8543044dd726b0d30666663 /net/ftp/ftp_network_transaction.h | |
parent | 5d8054efc1e1f26ea806e46869df5e0a84e41a4c (diff) | |
download | chromium_src-d100e44f64d4abb2cc244cb61bb736c602146767.zip chromium_src-d100e44f64d4abb2cc244cb61bb736c602146767.tar.gz chromium_src-d100e44f64d4abb2cc244cb61bb736c602146767.tar.bz2 |
More net/ method ordering.
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6339012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp/ftp_network_transaction.h')
-rw-r--r-- | net/ftp/ftp_network_transaction.h | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h index 678308a..c4516a4 100644 --- a/net/ftp/ftp_network_transaction.h +++ b/net/ftp/ftp_network_transaction.h @@ -31,15 +31,16 @@ class FtpNetworkTransaction : public FtpTransaction { ClientSocketFactory* socket_factory); virtual ~FtpNetworkTransaction(); + virtual int Stop(int error); + virtual int RestartIgnoringLastError(CompletionCallback* callback); + // FtpTransaction methods: virtual int Start(const FtpRequestInfo* request_info, CompletionCallback* callback, const BoundNetLog& net_log); - virtual int Stop(int error); virtual int RestartWithAuth(const string16& username, const string16& password, CompletionCallback* callback); - virtual int RestartIgnoringLastError(CompletionCallback* callback); virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); virtual const FtpResponseInfo* GetResponseInfo() const; virtual LoadState GetLoadState() const; @@ -87,6 +88,36 @@ class FtpNetworkTransaction : public FtpTransaction { RESOURCE_TYPE_DIRECTORY, }; + enum State { + // Control connection states: + STATE_CTRL_RESOLVE_HOST, + STATE_CTRL_RESOLVE_HOST_COMPLETE, + STATE_CTRL_CONNECT, + STATE_CTRL_CONNECT_COMPLETE, + STATE_CTRL_READ, + STATE_CTRL_READ_COMPLETE, + STATE_CTRL_WRITE, + STATE_CTRL_WRITE_COMPLETE, + STATE_CTRL_WRITE_USER, + STATE_CTRL_WRITE_PASS, + STATE_CTRL_WRITE_SYST, + STATE_CTRL_WRITE_TYPE, + STATE_CTRL_WRITE_EPSV, + STATE_CTRL_WRITE_PASV, + STATE_CTRL_WRITE_PWD, + STATE_CTRL_WRITE_RETR, + STATE_CTRL_WRITE_SIZE, + STATE_CTRL_WRITE_CWD, + STATE_CTRL_WRITE_LIST, + STATE_CTRL_WRITE_QUIT, + // Data connection states: + STATE_DATA_CONNECT, + STATE_DATA_CONNECT_COMPLETE, + STATE_DATA_READ, + STATE_DATA_READ_COMPLETE, + STATE_NONE + }; + // Resets the members of the transaction so it can be restarted. void ResetStateForRestart(); @@ -211,35 +242,6 @@ class FtpNetworkTransaction : public FtpTransaction { scoped_ptr<ClientSocket> ctrl_socket_; scoped_ptr<ClientSocket> data_socket_; - enum State { - // Control connection states: - STATE_CTRL_RESOLVE_HOST, - STATE_CTRL_RESOLVE_HOST_COMPLETE, - STATE_CTRL_CONNECT, - STATE_CTRL_CONNECT_COMPLETE, - STATE_CTRL_READ, - STATE_CTRL_READ_COMPLETE, - STATE_CTRL_WRITE, - STATE_CTRL_WRITE_COMPLETE, - STATE_CTRL_WRITE_USER, - STATE_CTRL_WRITE_PASS, - STATE_CTRL_WRITE_SYST, - STATE_CTRL_WRITE_TYPE, - STATE_CTRL_WRITE_EPSV, - STATE_CTRL_WRITE_PASV, - STATE_CTRL_WRITE_PWD, - STATE_CTRL_WRITE_RETR, - STATE_CTRL_WRITE_SIZE, - STATE_CTRL_WRITE_CWD, - STATE_CTRL_WRITE_LIST, - STATE_CTRL_WRITE_QUIT, - // Data connection states: - STATE_DATA_CONNECT, - STATE_DATA_CONNECT_COMPLETE, - STATE_DATA_READ, - STATE_DATA_READ_COMPLETE, - STATE_NONE - }; State next_state_; }; |