diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 20:25:12 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 20:25:12 +0000 |
commit | b6f936cf956a9860184846c8e3d6e403d7787f04 (patch) | |
tree | 2c287eb11f54121f5629589fdc88b7edd8fc4736 /net | |
parent | 1ffa6d12cd230669a9b1439ab14222094415acf8 (diff) | |
download | chromium_src-b6f936cf956a9860184846c8e3d6e403d7787f04.zip chromium_src-b6f936cf956a9860184846c8e3d6e403d7787f04.tar.gz chromium_src-b6f936cf956a9860184846c8e3d6e403d7787f04.tar.bz2 |
Distinguish between old and new FTP LIST response parsers
in FTP histograms. This should allow us to see how compatible the
new parser is.
TEST=none
BUG=25520
Review URL: http://codereview.chromium.org/384007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/ftp/ftp_directory_listing_parsers.h | 4 | ||||
-rw-r--r-- | net/ftp/ftp_server_type_histograms.h | 24 |
2 files changed, 18 insertions, 10 deletions
diff --git a/net/ftp/ftp_directory_listing_parsers.h b/net/ftp/ftp_directory_listing_parsers.h index 6906861..e02bb1d 100644 --- a/net/ftp/ftp_directory_listing_parsers.h +++ b/net/ftp/ftp_directory_listing_parsers.h @@ -52,7 +52,7 @@ class FtpLsDirectoryListingParser : public FtpDirectoryListingParser { FtpLsDirectoryListingParser(); // FtpDirectoryListingParser methods: - virtual FtpServerType GetServerType() const { return SERVER_LSL; } + virtual FtpServerType GetServerType() const { return SERVER_LS; } virtual bool ConsumeLine(const string16& line); virtual bool EntryAvailable() const; virtual FtpDirectoryListingEntry PopEntry(); @@ -70,7 +70,7 @@ class FtpWindowsDirectoryListingParser : public FtpDirectoryListingParser { FtpWindowsDirectoryListingParser(); // FtpDirectoryListingParser methods: - virtual FtpServerType GetServerType() const { return SERVER_DOS; } + virtual FtpServerType GetServerType() const { return SERVER_WINDOWS; } virtual bool ConsumeLine(const string16& line); virtual bool EntryAvailable() const; virtual FtpDirectoryListingEntry PopEntry(); diff --git a/net/ftp/ftp_server_type_histograms.h b/net/ftp/ftp_server_type_histograms.h index 08ca424..fef9bb2 100644 --- a/net/ftp/ftp_server_type_histograms.h +++ b/net/ftp/ftp_server_type_histograms.h @@ -19,14 +19,22 @@ enum FtpServerType { // connecting to isn't an FTP server), or a broken server. SERVER_UNKNOWN = 0, - SERVER_LSL = 1, // Server using /bin/ls -l and variants. - SERVER_DLS = 2, // Server using /bin/dls. - SERVER_EPLF = 3, // Server using EPLF format. - SERVER_DOS = 4, // WinNT server configured for old style listing. - SERVER_VMS = 5, // VMS (including variants). - SERVER_CMS = 6, // IBM VM/CMS, VM/ESA, z/VM formats. - SERVER_OS2 = 7, // OS/2 FTP Server. - SERVER_W16 = 8, // win16 hosts: SuperTCP or NetManage Chameleon. + // The types below are recognized by ParseFTPList code from Mozilla. If we hit + // one of these, it means that our new LIST parser failed for that server. + SERVER_MOZ_LSL = 1, // Server using /bin/ls -l and variants. + SERVER_MOZ_DLS = 2, // Server using /bin/dls. + SERVER_MOZ_EPLF = 3, // Server using EPLF format. + SERVER_MOZ_DOS = 4, // WinNT server configured for old style listing. + SERVER_MOZ_VMS = 5, // VMS (including variants). + SERVER_MOZ_CMS = 6, // IBM VM/CMS, VM/ESA, z/VM formats. + SERVER_MOZ_OS2 = 7, // OS/2 FTP Server. + SERVER_MOZ_W16 = 8, // win16 hosts: SuperTCP or NetManage Chameleon. + + // The types below are recognized by our new LIST parser. If we hit one of + // these, it means that it's working quite well. + SERVER_LS = 9, // Server using /bin/ls -l listing style. + SERVER_WINDOWS = 10, // Server using Windows listing style. + SERVER_VMS = 11, // Server using VMS listing style. NUM_OF_SERVER_TYPES }; |