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

Side by Side Diff: net/ftp/ftp_directory_listing_parser_ls.h

Issue 469010: Add support for wu-ftpd style FTP LIST response format. (Closed)
Patch Set: fix some typos Created 11 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_ 5 #ifndef NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_
6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_ 6 #define NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "net/ftp/ftp_directory_listing_parser.h" 10 #include "net/ftp/ftp_directory_listing_parser.h"
(...skipping 12 matching lines...) Expand all
23 virtual bool EntryAvailable() const; 23 virtual bool EntryAvailable() const;
24 virtual FtpDirectoryListingEntry PopEntry(); 24 virtual FtpDirectoryListingEntry PopEntry();
25 25
26 private: 26 private:
27 bool received_nonempty_line_; 27 bool received_nonempty_line_;
28 28
29 // True after we have received a "total n" listing header, where n is an 29 // True after we have received a "total n" listing header, where n is an
30 // integer. Only one such header is allowed per listing. 30 // integer. Only one such header is allowed per listing.
31 bool received_total_line_; 31 bool received_total_line_;
32 32
33 // There is a variant of the listing served by wu-ftpd which doesn't contain
34 // the "number of links" column (the second column in a "standard" ls -l
35 // listing). Store an offset to reference later columns.
36 int column_offset_;
37
33 std::queue<FtpDirectoryListingEntry> entries_; 38 std::queue<FtpDirectoryListingEntry> entries_;
34 39
35 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserLs); 40 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserLs);
36 }; 41 };
37 42
38 } // namespace net 43 } // namespace net
39 44
40 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_ 45 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_
OLDNEW
« no previous file with comments | « net/ftp/ftp_directory_listing_buffer_unittest.cc ('k') | net/ftp/ftp_directory_listing_parser_ls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698