summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 17:16:02 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 17:16:02 +0000
commit7f041050fd817116b78aa09227f511cc6505d7f3 (patch)
tree9a4339cbec910d0732e12dfe58602680de1fb78e /net/base
parent3fd5be900801927ad4d7a8d8d44ebb63e19e90f3 (diff)
downloadchromium_src-7f041050fd817116b78aa09227f511cc6505d7f3.zip
chromium_src-7f041050fd817116b78aa09227f511cc6505d7f3.tar.gz
chromium_src-7f041050fd817116b78aa09227f511cc6505d7f3.tar.bz2
FTP: add more detailed error codes based on RFC 959.
This does not handle all cases yet, for simplicity. TEST=net_unittests BUG=none Review URL: http://codereview.chromium.org/2985012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/net_error_list.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/net/base/net_error_list.h b/net/base/net_error_list.h
index 06dca41..f8b4186 100644
--- a/net/base/net_error_list.h
+++ b/net/base/net_error_list.h
@@ -387,5 +387,35 @@ NET_ERROR(NO_PRIVATE_KEY_FOR_CERT, -502)
// An error adding to the OS certificate database (e.g. OS X Keychain).
NET_ERROR(ADD_USER_CERT_FAILED, -503)
-// The FTP PASV command failed.
-NET_ERROR(FTP_PASV_COMMAND_FAILED, -600)
+// *** Code -600 is reserved (was FTP_PASV_COMMAND_FAILED). ***
+
+// A generic error for failed FTP control connection command.
+// If possible, please use or add a more specific error code.
+NET_ERROR(FTP_FAILED, -601)
+
+// The server cannot fulfill the request at this point. This is a temporary
+// error.
+// FTP response code 421.
+NET_ERROR(FTP_SERVICE_UNAVAILABLE, -602)
+
+// The server has aborted the transfer.
+// FTP response code 426.
+NET_ERROR(FTP_TRANSFER_ABORTED, -603)
+
+// The file is busy, or some other temporary error condition on opening
+// the file.
+// FTP response code 450.
+NET_ERROR(FTP_FILE_BUSY, -604)
+
+// Server rejected our command because of syntax errors.
+// FTP response codes 500, 501.
+NET_ERROR(FTP_SYNTAX_ERROR, -605)
+
+// Server does not support the command we issued.
+// FTP response codes 502, 504.
+NET_ERROR(FTP_COMMAND_NOT_SUPPORTED, -606)
+
+// Server rejected our command because we didn't issue the commands in right
+// order.
+// FTP response code 503.
+NET_ERROR(FTP_BAD_COMMAND_SEQUENCE, -607)