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

Unified Diff: net/url_request/url_request_new_ftp_job.cc

Issue 192038: Don't log empty FTP LIST responses as unknown server type. (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_new_ftp_job.cc
diff --git a/net/url_request/url_request_new_ftp_job.cc b/net/url_request/url_request_new_ftp_job.cc
index a6b5e9f803067e4052798bfd55f60de71950ec49..0083e23bedf933d39fd4f32febc21aafaf9caf79 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)
eroman 2009/09/08 22:20:14 Style comment: I recommend doing this at the call
wtc 2009/09/09 01:14:50 I agree. I also suggest that we change LogFtpServ
+ return;
+
switch (list_state.lstyle) {
case 'E':
net::UpdateFtpServerTypeHistograms(net::SERVER_EPLF);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698