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

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

Issue 6515009: FTP: Compatibility fix for "ls -l" style directory listing parser.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the 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 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 10
(...skipping 12 matching lines...) Expand all
23 virtual ~FtpDirectoryListingParserLs(); 23 virtual ~FtpDirectoryListingParserLs();
24 24
25 // FtpDirectoryListingParser methods: 25 // FtpDirectoryListingParser methods:
26 virtual FtpServerType GetServerType() const; 26 virtual FtpServerType GetServerType() const;
27 virtual bool ConsumeLine(const string16& line); 27 virtual bool ConsumeLine(const string16& line);
28 virtual bool OnEndOfInput(); 28 virtual bool OnEndOfInput();
29 virtual bool EntryAvailable() const; 29 virtual bool EntryAvailable() const;
30 virtual FtpDirectoryListingEntry PopEntry(); 30 virtual FtpDirectoryListingEntry PopEntry();
31 31
32 private: 32 private:
33 bool received_nonempty_line_;
34
35 // True after we have received a "total n" listing header, where n is an 33 // True after we have received a "total n" listing header, where n is an
36 // integer. Only one such header is allowed per listing. 34 // integer. Only one such header is allowed per listing.
37 bool received_total_line_; 35 bool received_total_line_;
38 36
39 // Store the current time. We need it to correctly parse received dates. 37 // Store the current time. We need it to correctly parse received dates.
40 const base::Time current_time_; 38 const base::Time current_time_;
41 39
42 std::queue<FtpDirectoryListingEntry> entries_; 40 std::queue<FtpDirectoryListingEntry> entries_;
43 41
44 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserLs); 42 DISALLOW_COPY_AND_ASSIGN(FtpDirectoryListingParserLs);
45 }; 43 };
46 44
47 } // namespace net 45 } // namespace net
48 46
49 #endif // NET_FTP_FTP_DIRECTORY_LISTING_PARSER_LS_H_ 47 #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