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

Unified Diff: net/ftp/ftp_directory_listing_buffer.cc

Issue 343073: Use the new FTP LIST parsing code in the browser. (Closed)
Patch Set: fixes 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_buffer.h ('k') | net/ftp/ftp_directory_listing_parsers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_directory_listing_buffer.cc
diff --git a/net/ftp/ftp_directory_listing_buffer.cc b/net/ftp/ftp_directory_listing_buffer.cc
index 030da83d7cd4c145ce1c7f2fecf2166a60c86403..830ec3b54688a11887c2edf1f31598971599d08a 100644
--- a/net/ftp/ftp_directory_listing_buffer.cc
+++ b/net/ftp/ftp_directory_listing_buffer.cc
@@ -65,6 +65,9 @@ int FtpDirectoryListingBuffer::ProcessRemainingData() {
if (rv != OK)
return rv;
+ if (!buffer_.empty())
+ return ERR_INVALID_RESPONSE;
+
return ParseLines();
}
@@ -77,6 +80,10 @@ FtpDirectoryListingEntry FtpDirectoryListingBuffer::PopEntry() {
return current_parser_->PopEntry();
}
+FtpServerType FtpDirectoryListingBuffer::GetServerType() const {
+ return (current_parser_ ? current_parser_->GetServerType() : SERVER_UNKNOWN);
+}
+
bool FtpDirectoryListingBuffer::ConvertToDetectedEncoding(
const std::string& from, string16* to) {
std::string encoding(encoding_.empty() ? "ascii" : encoding_);
« no previous file with comments | « net/ftp/ftp_directory_listing_buffer.h ('k') | net/ftp/ftp_directory_listing_parsers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698