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 | |
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
-rw-r--r-- | net/ftp/ftp_directory_listing_parsers.h | 4 | ||||
-rw-r--r-- | net/ftp/ftp_server_type_histograms.h | 24 | ||||
-rw-r--r-- | webkit/glue/ftp_directory_listing_response_delegate.cc | 16 |
3 files changed, 26 insertions, 18 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 }; diff --git a/webkit/glue/ftp_directory_listing_response_delegate.cc b/webkit/glue/ftp_directory_listing_response_delegate.cc index 9f7f062..893d6a3 100644 --- a/webkit/glue/ftp_directory_listing_response_delegate.cc +++ b/webkit/glue/ftp_directory_listing_response_delegate.cc @@ -82,28 +82,28 @@ void ExtractFullLinesFromBuffer(std::string* buffer, void LogFtpServerType(char server_type) { switch (server_type) { case 'E': - net::UpdateFtpServerTypeHistograms(net::SERVER_EPLF); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_EPLF); break; case 'V': - net::UpdateFtpServerTypeHistograms(net::SERVER_VMS); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_VMS); break; case 'C': - net::UpdateFtpServerTypeHistograms(net::SERVER_CMS); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_CMS); break; case 'W': - net::UpdateFtpServerTypeHistograms(net::SERVER_DOS); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_DOS); break; case 'O': - net::UpdateFtpServerTypeHistograms(net::SERVER_OS2); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_OS2); break; case 'U': - net::UpdateFtpServerTypeHistograms(net::SERVER_LSL); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_LSL); break; case 'w': - net::UpdateFtpServerTypeHistograms(net::SERVER_W16); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_W16); break; case 'D': - net::UpdateFtpServerTypeHistograms(net::SERVER_DLS); + net::UpdateFtpServerTypeHistograms(net::SERVER_MOZ_DLS); break; default: net::UpdateFtpServerTypeHistograms(net::SERVER_UNKNOWN); |