summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-08 18:12:39 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-08 18:12:39 +0000
commitc774c953ba1a748254528c26d1e5e72ad8ccbf27 (patch)
tree683670ae693dfbb96dd0634e8e8387a5234b2577 /net
parent5382cd819d014c1ccbb64f4921a85db1cba341e1 (diff)
downloadchromium_src-c774c953ba1a748254528c26d1e5e72ad8ccbf27.zip
chromium_src-c774c953ba1a748254528c26d1e5e72ad8ccbf27.tar.gz
chromium_src-c774c953ba1a748254528c26d1e5e72ad8ccbf27.tar.bz2
Don't log empty FTP LIST responses as unknown server type.
The histograms will be more accurate after this change. TEST=none BUG=20335 Review URL: http://codereview.chromium.org/192038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/url_request/url_request_new_ftp_job.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/url_request/url_request_new_ftp_job.cc b/net/url_request/url_request_new_ftp_job.cc
index a6b5e9f..0083e23 100644
--- a/net/url_request/url_request_new_ftp_job.cc
+++ b/net/url_request/url_request_new_ftp_job.cc
@@ -284,6 +284,11 @@ int URLRequestNewFtpJob::ProcessFtpDir(net::IOBuffer *buf,
}
void URLRequestNewFtpJob::LogFtpServerType(const net::ListState& list_state) {
+ // We can't recognize server type based on empty directory listings. Don't log
+ // that as unknown, it's misleading.
+ if (!list_state.parsed_one)
+ return;
+
switch (list_state.lstyle) {
case 'E':
net::UpdateFtpServerTypeHistograms(net::SERVER_EPLF);