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

Unified Diff: net/ftp/ftp_directory_listing_parsers.cc

Issue 421006: Fix recognizing FTP listings consisting of only one line. (Closed)
Patch Set: Created 11 years, 1 month 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 | « net/ftp/ftp_directory_listing_parsers.h ('k') | net/ftp/ftp_directory_listing_parsers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_parsers.cc
diff --git a/net/ftp/ftp_directory_listing_parsers.cc b/net/ftp/ftp_directory_listing_parsers.cc
index c2679d7727c1c14d2fc30834573a36e6dba86862..8963624cd05296225d68776477082cfc66b458c3 100644
--- a/net/ftp/ftp_directory_listing_parsers.cc
+++ b/net/ftp/ftp_directory_listing_parsers.cc
@@ -341,6 +341,10 @@ bool FtpLsDirectoryListingParser::ConsumeLine(const string16& line) {
return true;
}
+bool FtpLsDirectoryListingParser::OnEndOfInput() {
+ return true;
+}
+
bool FtpLsDirectoryListingParser::EntryAvailable() const {
return !entries_.empty();
}
@@ -381,6 +385,10 @@ bool FtpWindowsDirectoryListingParser::ConsumeLine(const string16& line) {
return true;
}
+bool FtpWindowsDirectoryListingParser::OnEndOfInput() {
+ return true;
+}
+
bool FtpWindowsDirectoryListingParser::EntryAvailable() const {
return !entries_.empty();
}
@@ -441,6 +449,10 @@ bool FtpVmsDirectoryListingParser::ConsumeLine(const string16& line) {
}
}
+bool FtpVmsDirectoryListingParser::OnEndOfInput() {
+ return (state_ == STATE_END);
+}
+
bool FtpVmsDirectoryListingParser::EntryAvailable() const {
return !entries_.empty();
}
« no previous file with comments | « net/ftp/ftp_directory_listing_parsers.h ('k') | net/ftp/ftp_directory_listing_parsers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698