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

Unified Diff: net/ftp/ftp_network_transaction.h

Issue 215058: Correctly talk to VMS servers (translate UNIX paths to VMS and vice versa). (Closed)
Patch Set: fixes Created 11 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/ftp/ftp_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction.h
diff --git a/net/ftp/ftp_network_transaction.h b/net/ftp/ftp_network_transaction.h
index 3366c71cd7735a6be2511e73c42a408d05d576de..e621a9bfbc41e8be768869b14b81a28c8f59048c 100644
--- a/net/ftp/ftp_network_transaction.h
+++ b/net/ftp/ftp_network_transaction.h
@@ -85,6 +85,15 @@ class FtpNetworkTransaction : public FtpTransaction {
ERROR_CLASS_PERMANENT_ERROR,
};
+ // Major categories of remote system types, as returned by SYST command.
+ enum SystemType {
+ SYSTEM_TYPE_UNKNOWN,
+ SYSTEM_TYPE_UNIX,
+ SYSTEM_TYPE_WINDOWS,
+ SYSTEM_TYPE_OS2,
+ SYSTEM_TYPE_VMS,
+ };
+
// Resets the members of the transaction so it can be restarted.
void ResetStateForRestart();
@@ -101,8 +110,9 @@ class FtpNetworkTransaction : public FtpTransaction {
// code to be in range 100-599.
static ErrorClass GetErrorClass(int response_code);
- // Returns request path suitable to be included in an FTP command.
- std::string GetRequestPathForFtpCommand() const;
+ // Returns request path suitable to be included in an FTP command. If the path
+ // will be used as a directory, |is_directory| should be true.
+ std::string GetRequestPathForFtpCommand(bool is_directory) const;
// Runs the state transition loop.
int DoLoop(int result);
@@ -190,11 +200,17 @@ class FtpNetworkTransaction : public FtpTransaction {
int last_error_;
+ SystemType system_type_;
+
// We get username and password as wstrings in RestartWithAuth, so they are
// also kept as wstrings here.
std::wstring username_;
std::wstring password_;
+ // Current directory on the remote server, as returned by last PWD command,
+ // with any trailing slash removed.
+ std::string current_remote_directory_;
+
bool retr_failed_;
int data_connection_port_;
« 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