diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:55:57 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:55:57 +0000 |
commit | b4015eaaa7cad8c56fd29d5fc5e3b7e1e88cbbec (patch) | |
tree | 604b37d35bbf51356ab28db09ea7422794d1dc7a /net/ftp/ftp_network_transaction.cc | |
parent | 0b02c50117a37d373c51e3114c3a2053ebbc92a1 (diff) | |
download | chromium_src-b4015eaaa7cad8c56fd29d5fc5e3b7e1e88cbbec.zip chromium_src-b4015eaaa7cad8c56fd29d5fc5e3b7e1e88cbbec.tar.gz chromium_src-b4015eaaa7cad8c56fd29d5fc5e3b7e1e88cbbec.tar.bz2 |
Add DCHECKs to the states that should be entered only when the
previous state succeeded.
R=ibrar,phajdan.jr
BUG=http://crbug.com/4965
TEST=none
Review URL: http://codereview.chromium.org/149013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp/ftp_network_transaction.cc')
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index 098cbd0..248b716 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -239,6 +239,7 @@ int FtpNetworkTransaction::DoLoop(int result) { rv = DoCtrlConnectComplete(rv); break; case STATE_CTRL_READ: + DCHECK(rv == OK); rv = DoCtrlRead(); break; case STATE_CTRL_READ_COMPLETE: @@ -281,19 +282,24 @@ int FtpNetworkTransaction::DoLoop(int result) { rv = DoCtrlWriteSIZE(); break; case STATE_CTRL_WRITE_CWD: + DCHECK(rv == OK); rv = DoCtrlWriteCWD(); break; case STATE_CTRL_WRITE_LIST: + DCHECK(rv == OK); rv = DoCtrlWriteLIST(); break; case STATE_CTRL_WRITE_MDTM: + DCHECK(rv == OK); rv = DoCtrlWriteMDTM(); break; case STATE_CTRL_WRITE_QUIT: + DCHECK(rv == OK); rv = DoCtrlWriteQUIT(); break; case STATE_DATA_RESOLVE_HOST: + DCHECK(rv == OK); rv = DoDataResolveHost(); break; case STATE_DATA_RESOLVE_HOST_COMPLETE: @@ -307,6 +313,7 @@ int FtpNetworkTransaction::DoLoop(int result) { rv = DoDataConnectComplete(rv); break; case STATE_DATA_READ: + DCHECK(rv == OK); rv = DoDataRead(); break; case STATE_DATA_READ_COMPLETE: |