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

Unified Diff: webkit/glue/ftp_directory_listing_response_delegate.h

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_parsers.h ('k') | webkit/glue/ftp_directory_listing_response_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/ftp_directory_listing_response_delegate.h
diff --git a/webkit/glue/ftp_directory_listing_response_delegate.h b/webkit/glue/ftp_directory_listing_response_delegate.h
index 1ca42d7a22995facbe5d3ebd7b81dc1c838206e9..82d955cdb9fa12526e9aa00a77499345234b3ca8 100644
--- a/webkit/glue/ftp_directory_listing_response_delegate.h
+++ b/webkit/glue/ftp_directory_listing_response_delegate.h
@@ -10,6 +10,7 @@
#include <string>
+#include "net/ftp/ftp_directory_listing_buffer.h"
#include "net/third_party/parseftp/ParseFTPList.h"
#include "webkit/api/public/WebURLResponse.h"
@@ -33,6 +34,11 @@ class FtpDirectoryListingResponseDelegate {
private:
void Init();
+ // Use the old parser to process received listing data.
+ void FeedFallbackParser();
+
+ void AppendEntryToResponseBuffer(const net::FtpDirectoryListingEntry& entry);
+
void SendResponseBufferToClient();
// Pointers to the client and associated loader so we can make callbacks as
@@ -44,6 +50,14 @@ class FtpDirectoryListingResponseDelegate {
// starting point for each parts response.
WebKit::WebURLResponse original_response_;
+ // Data buffer also responsible for parsing the listing data (the new parser).
+ // TODO(phajdan.jr): Use only the new parser, when it is more compatible.
+ net::FtpDirectoryListingBuffer buffer_;
+
+ // True if the new parser couldn't recognize the received listing format
+ // and we switched to the old parser.
+ bool parser_fallback_;
+
// State kept between parsing each line of the response.
struct net::list_state parse_state_;
« no previous file with comments | « net/ftp/ftp_directory_listing_parsers.h ('k') | webkit/glue/ftp_directory_listing_response_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698